What this is
A 'perfect' email regex does not exist. RFC 5322 allows comments, quoted local parts, and bizarre hosts. For sign-up forms, validate a reasonable subset then send a confirmation mail. This pattern is the usual web compromise: local part, @, domain labels, TLD ≥ 2.
/^[A-Za-z0-9._%+\-]+@[A-Za-z0-9.\-]+\.[A-Za-z]{2,}$/ada@example.com not-an-email Ada+tag@sub.example.co.uk
FAQ
- Should I use this as the only check?
- No. Unicode emails, new gTLDs, and quoted local parts fail. Pair with an actual send.