Skip to content

Instantly share code, notes, and snippets.

@JamieMason
Created February 3, 2011 09:35
Show Gist options
  • Save JamieMason/809266 to your computer and use it in GitHub Desktop.
Save JamieMason/809266 to your computer and use it in GitHub Desktop.
RegExp to match opening and closing HTML tags and comments
document.body.innerHTML.match(/<[^>]+>/gi);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment