Last active
May 14, 2023 18:02
-
-
Save SubZane/3f5206fb439d080a8680 to your computer and use it in GitHub Desktop.
Regex to remove empty html tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<(\w+)\b(?:\s+[\w\-.:]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[\w\-.:]+))?)*\s*/?>\s*</\1\s*> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment