python re ?: code example
Example 1: python regex search group
>>> m = re.match(r"(\w+) (\w+)", "Isaac Newton, physicist")
>>> m[0] # The entire match
'Isaac Newton'
>>> m[1] # The first parenthesized subgroup.
'Isaac'
>>> m[2] # The second parenthesized subgroup.
'Newton'
Example 2: python re
m = re.search(r'[cbm]at', 'aat')
print(m)
Example 3: python re
parse("Today is Dec 1 16", fuzzy_with_tokens=True)
parse("Today is Dec 1 14", fuzzy_with_tokens=True)
parse("Today is Nov 30 12", fuzzy_with_tokens=True)