Skip to content

Instantly share code, notes, and snippets.

@yosefsadek
Created January 18, 2020 01:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yosefsadek/b65a688de3f5fbbe81e0d247b4da60c5 to your computer and use it in GitHub Desktop.
Save yosefsadek/b65a688de3f5fbbe81e0d247b4da60c5 to your computer and use it in GitHub Desktop.
py
import re
password = input("Enter an email address: ")
while len(password)==0:
password = input("Enter an email address: ")
pattern = "^[A-Za-z0-9]+\@[A-Za-z0-9]+\.[A-Za-z0-9]+$"
passwordMatch = re.match(pattern, password)
if passwordMatch:
print("VALID")
else:
print("INVALID")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment