Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: How can I strip away some nested markup code in html by perl, like <SCRIPT> ?

by chromatic (Archbishop)
on Apr 03, 2000 at 07:27 UTC ( [id://6699] : note . print w/replies, xml ) Need Help??


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

Unless you're dealing with very simple HTML (either generated by a program or by a beginner), you might discover that these approaches have limited degrees of success. ender's is the best, as it is least greedy.

For all non-trivial HTML parsing, look to CPAN modules: HTML::Parser and HTML::TokeParser.

  • Comment on Re: How can I strip away some nested markup code in html by perl, like <SCRIPT> ?