Created
January 2, 2020 12:35
-
-
Save JosiasAurel/a5466bea719eb8b31d03e93f4d897150 to your computer and use it in GitHub Desktop.
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 | |
pattern = r"([\w\.-]+)@([\w\.-]+)(\.[\w\.]+)" | |
str = input("Enter the text from which to extract : ") | |
match = re.search(pattern, str) | |
if match: | |
print(match.group()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment