Regular Expressions 101

Community Patterns

Community Library Entry

13

Regular Expression
Recommended
PCRE (PHP <7.3)

/
^[a-z0-9]+(?!.*(?:\+{2,}|\-{2,}|\.{2,}))(?:[\.+\-]{0,1}[a-z0-9])*@gmail\.com$
/
gmi

Description

Match Gmail Email

Submitted by Óscar Enríquez - 10 years ago