Email Validation Regex Pattern

Example:
^[\w.-]+@[\w.-]+\.[A-Za-z]{2,}$ Matches: ✓ user@example.com ✓ john.doe@company.co.uk ✓ test_123@sub.domain.org
Use ^[\w.-]+@[\w.-]+\.[A-Za-z]{2,}$ for email validation. This pattern validates 99% of real-world email addresses without RFC 5322 complexity. Allows letters, numbers, dots, hyphens, and underscores before @, and standard domain format after.
Try Regex Lab →

FAQs

Is this regex RFC 5322 compliant?

Not fully, but it validates 99% of real emails. Full RFC 5322 regex is impractically complex for most use cases.

Why not use a more permissive regex?

This balances validation strictness with usability. It catches typos while accepting all common email formats.