Created
November 25, 2024 05:23
-
-
Save OlegKorn/26f00c94e8d2b7a37381bf642fce40fa to your computer and use it in GitHub Desktop.
re - finding email in python
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
email_re = r"^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$" | |
email = re.search(email_re, str) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment