Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^([a-z][a-z0-9_.]+@([a-z0-9-]+\.)+[a-z]{2,6}(,\s{0,1}){0,1})+$
/

Description

  • Multiple emails separated with comma
  • Only one space allowed after comma
  • Avoid blank spaces between commas
Submitted by CsarEspejel - 8 months ago (Last modified 8 months ago)