Regular Expressions 101

Community Patterns

Email Domain Regex

2

Regular Expression
PCRE (PHP <7.3)

/
(?=^[^@\/\?]*$)(\w+\.)+([A-Za-z]+){2}$
/
igm

Description

A pattern to match the email domain suffix

Submitted by doug - 8 years ago