You are viewing a single comment's thread. Return to all comments →
import re from email.utils import parseaddr, formataddr pattern = r"^[a-zA-Z][\w.-]+@[a-zA-Z]+\.[a-zA-Z]{1,3}$" n = int(input()) for i in range(n): name, email = parseaddr(input()) if re.match(pattern, email): print(formataddr((name, email)))
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 →