diff --git a/build.py b/build.py index 8b13789..4d5ce3e 100644 --- a/build.py +++ b/build.py @@ -1 +1,10 @@ - +import re +def validate_email(user_input): + if user_input==None: + return False + isvalid=re.match(r'[\w.-]+@[\w.-]+.\w+',user_input) + if isvalid: + return True + else: + return False +print validate_email("heha@xya") diff --git a/build.pyc b/build.pyc new file mode 100644 index 0000000..ba588e1 Binary files /dev/null and b/build.pyc differ diff --git a/tests/__init__.pyc b/tests/__init__.pyc new file mode 100644 index 0000000..8100723 Binary files /dev/null and b/tests/__init__.pyc differ diff --git a/tests/test_validate_email.pyc b/tests/test_validate_email.pyc new file mode 100644 index 0000000..b205874 Binary files /dev/null and b/tests/test_validate_email.pyc differ