Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
^\/[a-zA-Z0-9\p{L}\p{N}]{1}[a-zA-Z0-9\p{L}\p{N} &-]{3,16}[a-zA-Z0-9\p{L}\p{N}]?(\/[a-zA-Z0-9\p{L}\p{N}]{1}[a-zA-Z0-9\p{L}\p{N} &-]{1,48}[a-zA-Z0-9\p{L}\p{N}]){0,4}$
/
gm

Description

regex for category separation and validation

Submitted by anonymous - 5 years ago