We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Detect the Email Addresses
Detect the Email Addresses
Sort by
recency
|
169 Discussions
|
Please Login in order to post a comment
Enter your code here. Read input from STDIN. Print output to STDOUT
this works for me
import re import sys
html= sys.stdin.read()
pattern= r'\w*.?\w+@\w+.?\w*.?\w*.?\w+'
matches=re.findall(pattern,html)
output=sorted(set(email for email in matches))
print(';'.join(output))
JavaScript
I made it so complex, even I got confused.
Corrected regex:
let criteria = /[\w._]+@[\w._]+[\w]/g;
Java 15
Python 3