Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^[a-zA-Z0-9\-_. ]{1,50}$
/
gm

Description

Based on 'Allow only letters from A to Z, numbers from 0 to 9 , hyphen, dash, underscore and the period.'

Submitted by Arturo Acuña - 3 years ago (Last modified 3 years ago)