Olá, gosto muito de estudar expressões regulares, pois considero uma ferramenta essencial para todo e qualquer programador de qualquer linguagem.
Tempos atrás vi este texto sobre RegEx e HTML. Infelizmente eles formam um casal muito temperamental e a necessidade tem que ser muito específica para haver chances de sucesso.
O ideal é normalizar o HTML para XML e trabalhar com DOM.
O tal texto é este:
http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags
Icon Lab in Action and New Overlays
-
You may remember my previous blog post where I announced I had been
collaborating with icon designer Dave Wilkinson over at GlyphLab. I created
for him Ico...