+ 1

Why isn't this code workin a expected?

import re s = 'Hello from shubhamg199630@gmail.com to priya@yahoo.com about the meeting @2PM' lst = re.findall('\S+@', s) print(lst) The above code should be extracting mail IDs from the string. instead it comes up with incomplete id like , shubhamg199630@... Why?

16th May 2020, 12:55 PM
Mons Joseph
Mons Joseph - avatar
1 ответ
0
import re s = 'Hello from shubhamg199630@gmail.com to priya@yahoo.com about the meeting @2PM' lst = re.findall('\S+@\S+', s) print(lst) This working but may not exactly for other examples, am not checked..
16th May 2020, 1:50 PM
Jayakrishna 🇮🇳