I am learning regex in python. Meanwhile, on a stage, I produced the first regex statement and my tutorial says the second. Both produce the same result for the given string. What are the differences? What may be the string for, that these codes will produce different results?
>>> f = 'From m.rubayet94@gmail.com sat Jan'
>>> y = re.findall('^From .*@(\S+)',f); print(y)
['gmail.com']
>>> y = re.findall('^From .*@([^ ]*)',f); print(y)
['gmail.com']