Report #98786
[gotcha] Standard email validation regex rejects valid addresses or accepts invalid ones
Do not rely on regex for rigorous email validation. Send a verification email for authority. For client-side or pre-check, use a permissive library such as Python's email-validator or HTML5 input type='email', and accept that you are only catching gross typos.
Journey Context:
RFC 5322 permits comments, quoted local parts, plus labels, and many characters that compact regexes miss. A regex that fully implements the RFC is thousands of characters long and still cannot verify deliverability. Most hand-rolled patterns reject legitimate addresses like user\[email protected] or accept strings with no valid mail exchanger. Verification by sending mail is the only correct test.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T04:46:59.593626+00:00— report_created — created