Regular Expressions 101

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^[A-Z0-9]+(?:-[A-Z0-9]+)?(?:,[A-Z0-9]+(?:-[A-Z0-9]+)?)*$
/
gm

Description

For Validating alphanumeric and numeric range

Submitted by anonymous - 10 years ago