http://qs321.pair.com?node_id=299430


in reply to Re: How can use Perl to strip away some nested HTML markup code, like <SCRIPT> ?
in thread How can use Perl to strip away some nested HTML markup code, like <SCRIPT> ?

Sure, that works for simple HTML, but real life HTML can fail on such a simple regex. For example:
<!-- > this is still the comment --> and some more text
In that case, "this is still the comment" would be left within the output, when it shouldn't be.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.