Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.