

You can't parse [X]HTML with regex. - alexbosworth
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454

======
nailer
You could shorten this to 'regexs are for strings, xml is tree shaped'.

This is the reason etree is now a standard type in Python.

