p = re.compile(r'^<(\w+) \w+> (\1@\w+.[a-zA-Z]+$)',re.I) m = p.match('<Tom Paris> tom@voyager.org') print(m.groups())
Sign in to make a reply
hello_spring_cc