2 comments

[ 2.6 ms ] story [ 12.5 ms ] thread
It feels very unnatural using regex to traverse HTML, however this seems like a somewhat decent solution. I doubt I'll be using it anytime soon, though.
Sorry, but I don't get this. If I want to switch tags in the source HTML then I would use Find/replace in my IDE or text editor. If I want to do something interesting with HTML tags live in the client browser then I would probably use the jQuery resources.

Maybe this is just some sort of demo of regular expressions - in which case it is mis-posted to HN.