How to validate email address with match regular expression in Python

1 Answer

0 votes
import re

email = "username@email.com"
m = re.match('[^@]+@[^@]+\.[^@]+', email)

if m:
    print("True")
else:
    print("False")


'''
run:

True

'''

 



answered Jun 30, 2018 by avibootz
...