Created
January 12, 2020 09:05
-
-
Save kaikiat/8642b8ffdf264cfdaa945500cc23ef47 to your computer and use it in GitHub Desktop.
Telegram Bot inline keyboard to prompt user for their email as well as to verify their email using regex
This file contains 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
def check_email(email): | |
regex = '^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$' | |
if(re.search(regex,email)): | |
print("Valid Email") | |
return True | |
else: | |
print("Invalid Email") | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment