Question regarding Regular Expressions in Python

Hey everyone 

So I’m learning about regular expressions and I came accross an exercise which is about the email from this line :

x = "From Sat Jan 5 09:14:16 2008"

I already know the solution but I was looking for the “non-greedy” answer which should give me “d@u” as the answer but I can’t get it to work. Here’s what I’ve come up with

y = re.findall('\S+?@\S+?',x)

which results in :


Any ideas on what I have to do in order to make it work ?

Thanks !

I was playing with the code and managed to get the result by 

y = re.findall('\S@\S', x)

Which gave me