re.findall
Return all non-overlapping matches of pattern in string, as a list of strings or tuples.
re.findall(pattern, string, flags=0)
pattern
The regular expression to search for.
string
The string to search in.
flags
Flags that modify the expression`s behavior.
Examples
>>> import re
>>> re.findall(r'\d+', '12 drummers, 11 pipers')
['12', '11']