Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- text = input()
- regex = r"(^|(?<=\s))([a-z0-9]+)([\.\-\_]{1}[a-z0-9]+)*(@)([a-z]+)(-[a-z]+)*(\.[a-z]+)+"
- emails = re.findall(regex, text)
- for i in range(len(emails)):
- emails[i] = "".join(emails[i])
- for s in emails:
- print(s)
Add Comment
Please, Sign In to add comment