Could anyone figure out why these 2 results are totally different:
import re
a = re.findall(r'\w+(?=,|\.)',"They were three: Felix, Victor, and Carlos.") ; print(a)
a = re.findall(r'\w+(?=(,|\.))',"They were three: Felix, Victor, and Carlos.") ; print(a)
1st return : ['Felix', 'Victor', 'Carlos']
2nd return: [',', ',', '.']
Thanks, Ascanio