re.Match.start()
re.Match.start() is a Python method in the Regex Module category. Returns the start position of the match (or a specific group). The syntax is Match.start([group]). Parameters: group — optional group. Returns: Integer position. A typical example: m = re.search(r"\d+", "abc123def")
m.start() # 3
m.end() # 6. A close sibling is re.search(), which scans through the string looking for a match to the regex pattern. Returns the first match or None. A close sibling is re.match(), which checks for a match only at the beginning of the string. A close sibling is re.fullmatch(), which checks if the entire string matches the regex pattern. A close sibling is re.findall(), which returns all non-overlapping matches as a list of strings or tuples. More about this category: Regular expression operations — search, match, findall, sub, split. For a broader walkthrough, read the Regex Module guide. Related Regex Module entries: re.search(), re.match(), re.fullmatch(), re.findall(), re.finditer(), re.sub().