Last active
August 23, 2016 02:52
-
-
Save drakemccabe/6063a208ec7bb240dd1f16d9e8ba8d91 to your computer and use it in GitHub Desktop.
regexs for manipulating html tags (amp) with find/replace in text editor
This file contains hidden or 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
# remove all inline style tags | |
(style=")([a-zA-Z0-9:;\.\s\(\)\-\,]*)(") | |
#remove all self closing tags and replace with correct tag | |
# find | |
<\s*([^\s>]+)([^>]*)/\s*> | |
# replace | |
<$1$2></$1> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment