Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^[A-Za-z](\d|[A-Za-z]|_){2,29}$
/
gm

Description

  • alphabetic small and capital
  • numeric 0-9
  • may contain underscore
  • must be at least 3 characters
  • cannot be longer than 30 characters
Submitted by anonymous - 6 years ago