sequence interpretation \number matches text of group number (numbered from \ matches only at the start of the string \ empty string at word boundaries \ empty string not at word boundaries \ any decimal digit character ([ - for ascii\ any nondecimal digit character ([^ - for ascii\ any whitespace character (\ \ \ \ \vfor ascii\ any nonwhitespace character ([\ \ \ \ \vfor ascii\ any alphanumeric character ([ -za- - _for ascii\ any nonalphanumeric character ([^ -za- - _for ascii \ matches only at the end of the string most of the standard escapes supported by python string literals are also accepted by the regular expression parser\ \ \ \ \ \ \ \xand \the python library manual gives these escapesinterpretation and additional details on pattern syntax in general but to further demonstrate how the re pattern syntax is typically used in scriptslet' go back to writing some code more pattern examples for more contextthe next few examples present short test files that match simple but representative pattern forms comments in example - describe the operations exercisedcheck table - to see which operators are used in these patterns if they are still confusingtry running these tests interactivelyand call group( instead of start(to see which strings are being matched by the patterns example - pp \lang\re-basics py ""literalssetsrangesalternativesand escapes all tests here print offset where pattern found ""import re the one to use today patternstring " ""xxabcdxxmatchobj re search(patternstringif matchobjprint(matchobj start()nonspecial chars match themselves means any one char search returns match object or none start is index where matched pattobj re compile(" * *"matchobj pattobj search("xxabcdxx"if matchobj' *means zero or more rs compile returns pattern obj patt search returns match obj regular expression pattern matching