Skip to content

Instantly share code, notes, and snippets.

@twome
Last active September 23, 2018 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save twome/59a054ea26c9001cea51 to your computer and use it in GitHub Desktop.
Save twome/59a054ea26c9001cea51 to your computer and use it in GitHub Desktop.
Regexes for finding and cleaning up ancient/bad/deprecated HTML for manual archaeology
# Exclude from find-all
-tmp/*, -.sass-cache/*, -*.min.*, -*-min.*
# Deprecated attributes
\s*(width|height|border|cellpadding|cellspacing|bordercolor|bgcolor|color|valign|align|hspace|vspace)="[^"]*"
# If there's no quotes, you can also hit their values
\s*(width|height|hspace|vspace)=\d*\%?
\s*(bordercolor|bgcolor|color)=#?\d{3,6}
# Deprecated tags
</?(font|center)[^>]*>
# Class names
(?:class=")[\w\- ]+(?:")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment