You are viewing a single comment's thread. Return to all comments →
import email.utils import re n = int(input()) for i in range(n): pattern = r'^[a-zA-Z][\w._-]+@[a-zA-Z]+\.[a-zA-Z]{1,3}$' inp = email.utils.parseaddr(input()) s = inp[1] result = re.match(pattern, s) if result: print(email.utils.formataddr(inp))
Seems like cookies are disabled on this browser, please enable them to open this website
Validating and Parsing Email Addresses
You are viewing a single comment's thread. Return to all comments →