Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^[a-zA-Z0-9](?:[\._-](?=[a-zA-Z0-9])|[a-zA-Z0-9])+@(?:[\._-](?=[a-zA-Z0-9])|[a-zA-Z0-9])+(?:[a-z]{2,4}|com|ru|by)$
/
i

Description

checks the email string for valid

Submitted by harimambura - 10 years ago