Regex for Validating an Email Address

A commonly used pattern for basic email address validation.

Published October 10, 2026

A commonly used pattern for basic email address validation.

Key points

  • Matches a local part (letters, digits, dots, plus, hyphen, underscore), an @, a domain, and a TLD of at least 2 letters
  • This is a practical, "good enough" check — the full email spec (RFC 5322) is far more permissive and complex than most regexes attempt to match
  • Always pair with an actual verification email for real validation, since a regex can't confirm the address exists

Example

^[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}$
More General articles