You are viewing a single comment's thread. Return to all comments →
def fun(s): if '@' not in s or s[0] == '@': return False else: name, rest = s.split('@', 1) if not all(c.isdigit() or c.isalpha() or c in ['-', '_'] for c in name): return False if '.' not in rest: return False web, ext = rest.split('.', 1) if not all(c.isdigit() or c.isalpha() for c in web): return False if not all(c.isalpha() for c in ext) or len(ext) > 3: return False return True
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 →