Skip to content

Instantly share code, notes, and snippets.

@kaikiat
Created January 12, 2020 09:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kaikiat/8642b8ffdf264cfdaa945500cc23ef47 to your computer and use it in GitHub Desktop.
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
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