Skip to content

Instantly share code, notes, and snippets.

@philsherry
Created May 11, 2010 07:45
Show Gist options
  • Save philsherry/397029 to your computer and use it in GitHub Desktop.
Save philsherry/397029 to your computer and use it in GitHub Desktop.
TextMate Command - will strip all class/id attributes
### 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'
@philsherry
Copy link
Author

I'm sure there's probably a far more efficient way to do this, so feel free to let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment