You are viewing a single comment's thread. Return to all comments →
import re def fun(s): try: username = s.split('@')[0] sec_part = s.split('@')[1] websitename = sec_part.split('.')[0] extension = sec_part.split('.')[1] except Exception: return False reg_username = r'^[a-zA-Z0-9_-]+$' reg_websitenane = r'^[a-zA-Z0-9]+$' reg_extension = r'^[a-zA-Z]{1,3}+$' if re.match(reg_username, username) is not None and re.match(reg_websitenane, websitename) is not None and re.match(reg_extension, extension) is not None: return True else: return False
Seems like cookies are disabled on this browser, please enable them to open this website
Validating Email Addresses With a Filter
You are viewing a single comment's thread. Return to all comments →