Aug-14-2020, 02:11 PM
If I have the following code:
import re
x = 'From [email protected] Sat Jan 5 09:14:16 2008'
y = re.findall('\S+?@\S+?', x)
print(y)
Why does it print 'stephen.marquard@u' not 'd@u', even though the non-greedy (?) is added to both sides?
import re
x = 'From [email protected] Sat Jan 5 09:14:16 2008'
y = re.findall('\S+?@\S+?', x)
print(y)
Why does it print 'stephen.marquard@u' not 'd@u', even though the non-greedy (?) is added to both sides?