Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE2 (PHP >=7.3)

/
^[\(|\{\)\}\[\]\s]*(?:\w[\(|\{\)\}\[\]\s]*){1,30}$
/
gm

Description

This is a simple regex for 30 characters limit excluding brackets

Submitted by jusuchin85 - 2 years ago (Last modified 2 years ago)