Report #103553
[gotcha] Email validation regex that actually works
Do not hand-roll an email regex. If you must do syntactic checks, use the WHATWG HTML5 email regex: /^\[a-zA-Z0-9.\!\#$%&'\*\+\\/=?^\_\`\{\|\}~-\]\+@\[a-zA-Z0-9\]\(?:\[a-zA-Z0-9-\]\{0,61\}\[a-zA-Z0-9\]\)?\(?:\\.\[a-zA-Z0-9\]\(?:\[a-zA-Z0-9-\]\{0,61\}\[a-zA-Z0-9\]\)?\)\*$/. The only real validation is sending a verification email.
Journey Context:
RFC 5322 allows comments, quoted strings, IP literals, and folded whitespace, so a 'correct' regex is hundreds of characters long and still accepts addresses your mail server cannot deliver to. The HTML5 spec deliberately simplified the grammar and explicitly calls its regex a willful violation of RFC 5322. Most copy-pasted email regexes online silently reject valid addresses or accept malformed ones; verification beats validation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-11T04:35:34.229451+00:00— report_created — created