Regular Expressions 101

Community Patterns

HTML Minifier

2

Regular Expression
PCRE2 (PHP >=7.3)

/
(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!\/?(?:textarea|pre)\b))*+)(?:<(?>textarea|pre)\b|\z))
/
gm

Description

Loading markdown...
Submitted by anonymous - 2 years ago