I just started learning about Regex in Python. I was going through this code for extracting the email address from a string.
str = 'purple [email protected], blah monkey [email protected] blah dishwasher'
emails1 = re.findall(r'[\w\.-]+@[\w\.-]+', str)
emails2 = re.findall(r'[\w.-]+@[\w.-]+', str)
Is there any difference between the code for emails1 and emails2? I tested it on one string and both are giving the same output.
This is my first post here. Please don't mind if my post was not according to any standards.Thanks.