Regex for Valid Email Address

All patterns
Validation26 chars · /i

Regex for Valid Email Address

Use this when you need a lightweight email format check in forms or ETL cleanup. It avoids spaces and requires a single @ plus a dot-delimited domain.

The expression

/^[^\s@]+@[^\s@]+\.[^\s@]+$/i

How to read it

Anchor: the match must start at the beginning of the string.

Anchor: the match must run to the end of the string.

\s matches any whitespace, including tabs and newlines.

A negated class [^ … ] matches anything except the listed characters.

iignore case

Validate your own text, line by line

no input
Try:

This expression is anchored, so it asks whether a whole string is valid. Each line above is tested on its own — it will not find a match inside a longer sentence.

Examples, checked in your browser

4/4 verified

jane.doe@example.com

Matches.

alerts+ops@tinapps.io

Matches.

missing-at-symbol.example.com

No match — this is the kind of input the pattern rejects.

bad space@example.com

No match — this is the kind of input the pattern rejects.

Use it in code

3 languages
JavaScript
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/i;
regex.test(input);
Python
import re
pattern = re.compile(r"^[^\s@]+@[^\s@]+\.[^\s@]+$", re.IGNORECASE)
bool(pattern.search(input))
Go
re := regexp.MustCompile("(?i)^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$")
matched := re.MatchString(input)

Other validation patterns

6
GroupValidation
Flags/i
Examples4
SafetyOK