character(sdescription \ \ \ \ matches the empty string not at the beginning or end of word matches any decimal digit same as '[ - ]matches any nondigit character same as '[^ - ]matches any whitespace character same as '[\ \ \ \ \ ]matches any nonwhitespace character same as '[\ \ \ \ \ ]matches any alphanumeric character matches any character not contained in the set defined by \ matches only at the end of the string matches literal backslash \ \ \ \ \the \ \ \ \ \wand \ special characters are interpreted differently if matching unicode strings in this casethey match all unicode characters that match the described property for example\ matches any unicode character that is classified as digit such as europeanarabicand indic digits which each occupy different range of unicode characters functions the following functions are used to perform pattern matching and replacementcompile(str [flags]compiles regular-expression pattern string into regular-expression object this object can be passed as the pattern argument to all the functions that follow the object also provides number of methods that are described shortly flags is the bitwise or of the followingflag description or ascii or ignorecase or locale or multiline perform -bit ascii-only matching (python onlyperforms non-case-sensitive matching uses locale settings for \ \ \band \ makes and apply to each line in addition to the beginning and end of the entire string (normally and apply only to the beginning and end of an entire string makes the dot character match all charactersincluding the newline uses information from the unicode character properties database for \ \ \band \ (python only python uses unicode by default ignores unescaped whitespace and comments in the pattern string or dotall or unicode or verbose escape(stringreturns string with all nonalphanumerics backslashed findall(patternstring [,flags]returns list of all nonoverlapping matches of pattern in stringincluding empty matches if the pattern has groupsa list of the text matched by the groups is returned lib fl ff