Back to Freecodecamp

Regular Expressions: Matching and Extracting Data

curriculum/challenges/english/blocks/python-for-everybody/5e7b9f0b0b6c005b0e76f06f.md

latest374 B
Original Source

--questions--

--text--

What will the following program print?:

python
import re
s = 'A message from [email protected] to [email protected] about meeting @2PM'
lst = re.findall('\\S+@\\S+', s)
print(lst)

--answers--

['[email protected]', '[email protected]']


['[email protected]']


['umich.edu', 'iupui.edu']


['csev@', 'cwen@']

--video-solution--

1