I have a long .txt file. I want to find all the matching results with regex.
for example :
test_str = 'ali. veli. ahmet.'
src = re.finditer(r'(\w+\.\s){1,2}', test_str, re.MULTILINE)
print(*src)
this code returns :
<re.Match object; span=(0, 11), match='ali. veli. '>
i need;
['ali. veli', 'veli. ahmet.']
how can i do that with regex?