Skip to main content
Regexflux

Simple Email Address

beginner

Basic email validation matching user@domain.tld format.

emailvalidationforminput

Pattern

/[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}/gi

Try It

0 of 7 strings matched

Explanation

Matches a basic email address: one or more word characters, dots, plus signs, or hyphens before the @, followed by a domain name with at least one dot and a TLD of 2+ letters.

Test Strings

Matching

  • user@example.com
  • john.doe+tag@company.org
  • test-123@sub.domain.co.uk

Non-matching

  • @example.com
  • user@
  • user@.com
  • plaintext

Language Compatibility

LanguageSupport
JSFull support
PYTHONFull support
JAVAFull support
PHPFull support
GOLimited support (ASCII-only word boundaries)

Code Snippets

const regex = /[\w.+-]+@[\w-]+\.[a-zA-Z]{2,}/gi;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);

Common Variations

Case-sensitive TLD

[\w.+-]+@[\w-]+\.[a-z]{2,}

Only matches lowercase TLDs

Related Patterns