Basic regex

Simpler patterns may miss edge cases.

import re
pat = r'^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,}$'
ok = bool(re.match(pat, addr))