Email Address (RFC 5322)
advancedMore comprehensive email validation following RFC 5322 standards.
emailvalidationrfcstandards
Pattern
/[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])?)*/gTry It
0 of 6 strings matched
Explanation
Matches email addresses following the RFC 5322 specification. The local part allows a wide range of special characters. The domain part requires valid label formatting with 63-character length limits per DNS label.
Test Strings
Matching
- user@example.com
- disposable.style.email.with+symbol@example.com
- admin@subdomain.example.org
Non-matching
- plaintext
- user@
- @example.com
Language Compatibility
| Language | Support |
|---|---|
| JS | Full support |
| PYTHON | Full support |
| JAVA | Full support |
| PHP | Full support |
| GO | Full support |
Code Snippets
const 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])?)*/g;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);Common Variations
Strict TLD
[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}Requires a proper TLD at the end