Last active
April 20, 2022 22:21
-
-
Save james-see/cc9ededd115d881de1b650616b362ae4 to your computer and use it in GitHub Desktop.
The best email parser on the planet. Email extraction. You are welcome world.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def finder(stringer): | |
EMAIL_REGEX = re.compile("(?:[a-zA-Z0-9!#$%&'*+\-\/\=?^_`{|}~]|\.(?!\.)){1,64}@(?:(?:[a-zA-Z0-9\-]){1,63}\.(?!\.)){1,4}(?:[a-zA-Z0-9]{2,12})") | |
emails = EMAIL_REGEX.findall(stringer) | |
return emails |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment