match all python regex code example
Example 1: find all regex matches python
matches = re.findall(r"xxx|yyy", a_string)
Example 2: re python3
import re
>>> m = re.search('(?<=abc)def', 'abcdef')
>>> m.group(0)
'def'
matches = re.findall(r"xxx|yyy", a_string)
import re
>>> m = re.search('(?<=abc)def', 'abcdef')
>>> m.group(0)
'def'