Regex to catch email addresses in email header
Regex to catch email addresses in email header Question: I’m trying to parse a To email header with a regex. If there are no <> characters then I want the whole string otherwise I want what is inside the <> pair. import re re_destinatario = re.compile(r’^.*?<?(?P<to>.*)>?’) addresses = [ ‘XKYDF/ABC (Caixa Corporativa)’, ‘Fulano de Tal …
Total answers: 2