remove javascript tag by perl

J

jjl

Could someone help me on how to remove javascript tag from HTML file by
perl, such as

<script language='javascript'> something </script>

I want to remove two script tags and something inside. Thanks for your help.
 
J

Jürgen Exner

jjl said:
Could someone help me on how to remove javascript tag from HTML file
by perl, such as

<script language='javascript'> something </script>

I want to remove two script tags and something inside. Thanks for
your help.

Use a proper parser that can parse HTML, e.g. HTML::parser.
For further details please see the FAQ: "How do I remove HTML from a
string?"

jue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top