Skip to content

Instantly share code, notes, and snippets.

@drakemccabe
Last active August 23, 2016 02:52
Show Gist options
  • Save drakemccabe/6063a208ec7bb240dd1f16d9e8ba8d91 to your computer and use it in GitHub Desktop.
Save drakemccabe/6063a208ec7bb240dd1f16d9e8ba8d91 to your computer and use it in GitHub Desktop.
regexs for manipulating html tags (amp) with find/replace in text editor
# 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