Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by ender (Novice)
on Mar 23, 2000 at 01:04 UTC ( [id://5919] : note . print w/replies, xml ) Need Help??


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

If you can get the whole page in one string, then you can use:

s/<script>.*?<\/script>//igs; Which will eat everything between <script> and </script> tags. (and the <script> and </script> tags as well)
  • Comment on Re: How can I strip away some nested markup code in html by perl, like <SCRIPT> ?
  • Download Code