Created
May 11, 2010 07:45
-
-
Save philsherry/397029 to your computer and use it in GitHub Desktop.
TextMate Command - will strip all class/id attributes
This file contains 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
### TextMate Command - will strip all class/id attributes | |
### e.g. <div id="xkcd-147" class="foo bar lfc_ynwa" role="complimentary"> | |
### you'll be left with this: <div role="complimentary"> | |
sed -E 's/ \s?(class|id)="[-_a-zA-Z0-9 *+]+"//g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm sure there's probably a far more efficient way to do this, so feel free to let me know.