Created
June 10, 2010 00:22
-
-
Save indexzero/432393 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Match any well formed tags | |
(<([^<\>]*)>(.*?)</([^<\>]*)>|<([^<\>]*)/>) | |
Match any tag (with a couple variations) or anything between tags | |
(>[^<\>](.*?)<|<([^<\>]*)>|</([^<\>]*)>|<([^<\>]*)/>) | |
-> First Group (i.e. anything between tags isn't matching in RegexBuddy) | |
Match any tag (with one variation): | |
(>[^<\>](.*?)<|<([^<\>]*)>) | |
-> First Group (i.e. anything between tags isn't matching in RegexBuddy) | |
var html = "<div foo='foo'><nr/>foo<div>foobar</div><div><div><div></div>" | |
var split = html.split(/(<[^<\>]*>)/); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment