pattern = re.compile(r'^\w+ (\w+) (\w+)', re.M)
gad = pattern.findall("hello mr Islandt\nhello mr gadgets") print(gad)
The re.M flag allows the search to go on for multiple lines as long as there are more matches out there!
[
Collection
]
[
|
...
]