re.regex.subn()

regex.subn(repl, string, count=0) Identical to the subn() function, using the compiled pattern.

re.regex.sub()

regex.sub(repl, string, count=0) Identical to the sub() function, using the compiled pattern.

re.regex.split()

regex.split(string, maxsplit=0) Identical to the split() function, using the compiled pattern.

re.regex.search()

regex.search(string[, pos[, endpos]]) Scan through string looking for the first location where this regular expression produces a match, and return a corresponding match object. Return 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 second parameter pos gives an index in the string where the search is to start; it defaults to 0. This is not completely equivalent to slicing the string

re.regex.pattern

regex.pattern The pattern string from which the RE object was compiled.

re.regex.match()

regex.match(string[, pos[, endpos]]) If zero or more characters at the beginning of string match this regular expression, return a corresponding match object. Return None if the string does not match the pattern; note that this is different from a zero-length match. The optional pos and endpos parameters have the same meaning as for the search() method. >>> pattern = re.compile("o") >>> pattern.match("dog") # No match as "o" is not at the start of "dog". >>> p

re.regex.groups

regex.groups The number of capturing groups in the pattern.

re.regex.groupindex

regex.groupindex A dictionary mapping any symbolic group names defined by (?P<id>) to group numbers. The dictionary is empty if no symbolic groups were used in the pattern.

re.regex.fullmatch()

regex.fullmatch(string[, pos[, endpos]]) If the whole string matches this regular expression, return a corresponding match object. Return None if the string does not match the pattern; note that this is different from a zero-length match. The optional pos and endpos parameters have the same meaning as for the search() method. >>> pattern = re.compile("o[gh]") >>> pattern.fullmatch("dog") # No match as "o" is not at the start of "dog". >>> pattern.fullmatch("og

re.regex.flags

regex.flags The regex matching flags. This is a combination of the flags given to compile(), any (?...) inline flags in the pattern, and implicit flags such as UNICODE if the pattern is a Unicode string.