Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- regex = re.compile(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b')
- with open(path, 'rt') as f:
- for line in f:
- if re.fullmatch(regex, line):
- pass
- else:
- #print("Invalid email")
- print(line)
Add Comment
Please, Sign In to add comment