def name_of_email(addr): g = re.match(r'(?:<([\w\s]+)> )?([\w\.]+)@\w+\.\w+', addr) if not g: return None if g.group(1): return g.group(1) if g.group(2): return g.group(2)
Sign in to make a reply
zx_sunrise