Report #97293
[gotcha] A single regex cannot both reject all invalid emails and accept all valid ones
Use the simplest practical check \(one \`@\` and a non-empty domain\), then verify by sending; if you must validate HTML form input, use the WHATWG email state regex and accept that it is intentionally narrow.
Journey Context:
RFC 5322 allows quoted strings, comments, dots in strange places, and address literals; a regex that captures the full grammar is hundreds of characters and still rejects some edge cases. Conversely, common patterns like \`^\[\\w.-\]\+@\[\\w.-\]\+\\.\\w\+$\` reject valid addresses such as \`\[email protected]\`, \`[email protected]\`, or IDN domains. WHATWG's \`\` deliberately uses a narrow regex because the only true validation is deliverability. If you block real user emails at signup, you lose users; if you accept bad ones, handle the bounce.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:52:42.489304+00:00— report_created — created