Regular Expressions 101

Library entries

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

Vote

-3

Regular Expression
pcre

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

Description

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