Regular Expressions 101

Community Patterns

Match Gmail Email

14

Regular Expression
Recommended
PCRE (PHP <7.3)

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

Description

Loading markdown...
Submitted by Óscar Enríquez - 9 years ago