re don't inclue python code example
Example 1: python regex substitute
import re
s = "Example String"
replaced = re.sub('[ES]', 'a', s)
print replaced
Example 2: 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'