Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^[a-zA-Z]+(([ ][a-zA-Z ])?[a-zA-Z]*)*$
/
g

Description

Pattern means:

  • Name must start with characters
  • Only lowercase and uppercase characters is allowed
  • Allowed special character: space
Submitted by anonymous - 3 years ago