Regular Expressions 101

Community Patterns

A revised e-mail validation regular expression

1

Regular Expression
PCRE (PHP <7.3)

/
^(\w+(?:[\.-]?\w+)*)@(\w+(?:[\.-]?\w+)*)(\.[a-zA-Z]{2,})+$
/
g

Description

This one allows to begin with a digit, however, sometimes e-mail should begin with an **English letter **

Submitted by anonymous - 7 years ago