Question about Regular Expression From Video 11 B

Hello,

In the following challenge:

The regular expression is provided in the question:

import re
s = 'A message from csev@umich.edu to cwen@iupui.edu about meeting @2PM'
lst = re.findall('\\S+@\\S+', s)
print(lst)

However, it says it will match the following:

['csev@umich.edu', 'cwen@iupui.edu']

The issue is that, shouldn’t this not work?

the \\ should escape the backslash. So it should be checking a back slash, followed by one or more Capital S, a @ sign, a backslash, and then one or more Capital S.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.