Google News
logo
Python - Interview Questions
Write a reg expression that confirms an email id using the python reg expression module “re”?
Python has a regular expression module “re.”
 
Check out the “re” expression that can check the email id for .com and .co.in subdomain.
 
import re
print(re.search(r"[0-9a-zA-Z.]+@[a-zA-Z]+\.(com|co\.in)$","info@freetimelearning.com"))
Advertisement