Skip to main content
Regexflux

Email Address (RFC 5322)

advanced

More 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])?)*/g

Try 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

LanguageSupport
JSFull support
PYTHONFull support
JAVAFull support
PHPFull support
GOFull 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

Related Patterns