Introduction

Python makes regular expressions available through the re module.

Regular expressions are combinations of characters that are interpreted as rules for matching substrings. For instance, the expression 'amount\\D+\\d+' will match any string composed by the word amount plus an integral number, separated by one or more non-digits, such as: amount=100, amount is 3, amount is equal to: 33, etc.

Syntax of Direct Regular Expressions

Syntax of Precompiled Regular Expressions