Nikolaous
asked on
Regex: how to remove all empty html tags (including tags which contain colons)
So I know the following regex pattern will remove all empty html tags that just contain letters and numbers like <div></div> <p></p> <abc></abc> <123></123>
<(\w+)>(\s| )*</\1>
What I would like to do is also remove html tags that have special characters (specifically a colon) that come from applications like MS Office. So remove tags that are in the form of <o:p></o:p>
<(\w+)>(\s| )*</\1>
What I would like to do is also remove html tags that have special characters (specifically a colon) that come from applications like MS Office. So remove tags that are in the form of <o:p></o:p>
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.