Skip to content

Instantly share code, notes, and snippets.

@agusmakmun
Last active April 22, 2016 19:40
Show Gist options
  • Save agusmakmun/06d737ae720a93c966ececb74eb1b1d0 to your computer and use it in GitHub Desktop.
Save agusmakmun/06d737ae720a93c966ececb74eb1b1d0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# Email validator, {summonagus}
import re
input_email = raw_input("Masukkan email: ")
if not re.match(r"^[A-Za-z0-9\.\+_-]+@[A-Za-z0-9\._-]+\.[a-zA-Z]*$", input_email):
print "Email `{}` tidak valid!".format(input_email)
else:
print "Email `{}` valid!".format(input_email)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment