ARTICLE AD BOX
This is the code
import re pattern = "prefix .+ suffix" text = "prefix x suffix prefix y suffix" print(re.findall(pattern, text))and this is the output
['prefix x suffix prefix y suffix']but I'm expecting to get
['prefix x suffix', 'prefix y suffix']Why is this not working properly? re.findall() is supposed to find non-overlapping matches, but here the two matches are overlapping.
