ariel2 has asked for the wisdom of the Perl Monks concerning the following question:
Venerable Monks,
I need to search a chunk of html and match any div tags that only contain other html tags or space in them. Any div tags that actually have text in them should be left alone. Anyone know how to do this?
Thanks,
Ariel
Trying to find a robust regex solution for your problem will likely lead to insanity. On the other hand using a module such as HTML::TreeBuilder should make this fairly simple.