Regular Expressions 101

Community Patterns

1...45678...871

Clean empty tags from HTML tags incl. tags containing space(s)

-3

Regular Expression
PCRE (PHP <7.3)

/
<([^>\s]+)[^>]*>(?:\s*(?:br \/>| |&nbsp;|&thinsp;|&ensp;|&emsp;|&#8201;|&#8194;|&#8195;)\s*)*<\/\1>
/
gm

Description

no description available

Submitted by anonymous - 9 years ago