Email Address
Matches most common email address formats for basic input filtering.
Use this for a lightweight format check, not proof that an address exists or can receive mail.
regexemailvalidation
Find
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}Find pattern (regex)
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}Email syntax is surprisingly broad. For signup validation, prefer a modest format check followed by a verification email rather than trying to encode the full email standard in one regex.
The pattern accepts double dots in the domain (a@b..com) and rejects quoted local parts and internationalized addresses, both of which are legal. Encoding the full RFC 5322 grammar is possible but produces a regex nobody can maintain.
Common mistakes
- Rejecting valid international or unusual addresses with an over-specific pattern.
- Treating a regex match as email verification.
Related