Python Regex Module
Regular expression operations — search, match, findall, sub, split. This category documents 26 Python regex module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: re.search(), re.match(), re.fullmatch(), re.findall(), re.finditer(), re.sub(), re.subn(), re.split(), re.escape(), re.compile(), re.purge(), re.A / re.ASCII, re.I / re.IGNORECASE, re.M / re.MULTILINE, re.S / re.DOTALL, re.X / re.VERBOSE, re.Match.group(), re.Match.groups(), re.Match.groupdict(), re.Match.start(), re.Match.span(), Pattern.match(), Pattern.search(), Pattern.findall(), Pattern.sub(), Pattern.split(). re.search() scans through the string looking for a match to the regex pattern. Returns the first match or None. re.match() checks for a match only at the beginning of the string. re.fullmatch() checks if the entire string matches the regex pattern. re.findall() returns all non-overlapping matches as a list of strings or tuples.