Regular Expressions 101

Community Patterns

Require string of length Ignoring HTML

1

Regular Expression
PCRE (PHP <7.3)

/
((?![^<]*?>)\b[\w\h]{7,})
/
g

Description

checks for a continuous string of characters (in this case 7) , but ignores HTML tags

we use it in a required feild validator that has auto generated formatting elements

Submitted by Doom87er - 6 years ago