I researched this quite a bit, but couldn\'t find a working example how to match nested html tags with attributes. I know it is possible to match balanced/neste
I built a brief python script to solve the issue of managing nested tags. It runs happily with html and with other, terrible nested syntaxes too, as wiki code. Hyronically, I wrote it to avoid regex! I couldn't understand them at all. :-(. I used that function for anything, it runs very well for html and xml. It's fast too, since it only uses basic string search. I'm very happy to know that regex can't help. :-)
I'd like to share the script, if anyone of you is interested; but consider, I'm not a programmer, I presume that the issue has been solved for a long time!
You can find me at my talk page into it.source: http://it.wikisource.org/wiki/Discussioni_utente:Alex_brollo