Regular Expressions 101

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^([a-z0-9]+(?:([_-]+|[.])[\w-]+|[_-])*)@([a-z0-9]+(?:([.-]\w+)*\.)[a-z]{2,13})$
/
i

Description

^([a-z0-9]+(?:([-]+|[.])[\w-]+|[-]))@([a-z0-9]+(?:([.-]\w+).)[a-z]{2,13})$

Submitted by Riki - a year ago