Compiled regular expression objects support the following methods and attributes:
MatchObject instance. Return None if the string does not
match the pattern; note that this is different from a zero-length
match.
The optional second parameter pos gives an index in the string
where the search is to start; it defaults to 0. The
'' pattern character will match at the index where the
search is to start.
The optional parameter endpos limits how far the string will be searched; it will be as if the string is endpos characters long, so only the characters from pos to endpos will be searched for a match.
None if no
position in the string matches the pattern; note that this is
different from finding a zero-length match at some point in the string.
The optional pos and endpos parameters have the same
meaning as for the match method.
split function, using the compiled pattern.
sub function, using the compiled pattern.
subn function, using the compiled pattern.
?P<id>) to group numbers. The dictionary is empty if no
symbolic groups were used in the pattern.