Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^[a-zA-Z ]{2,50}$d
/
gm

Description

Regular Expression

^[a-zA-Z ]{2,50}$

  • Allow only letters a-z and space between each character to support multi-word single names.
  • Prone to errors in repeated spaces, to be cleanup by the app. Minimum 2 characters and max 50.
Submitted by Sowed Castelli - 3 years ago (Last modified 3 years ago)