[plug] Perl regex question

Arie Hol arie99 at ozemail.com.au
Sun Oct 26 01:43:09 WST 2008


Greetings to all,

I am trying to run a perl script which needs to apply a regex which will 
be effective over multiple lines.....

I would like to remove multiline javascript statements from within a web 
page which I want to archive.

Example :

<script language="javascript">
	I want to remove 
	the javascript lines as well as 
	the "script" tags which run over several lines
</script>

I have tried many different permutations, including the following :

$line =~ s/<script.*script>//smi ;

I read the Perl documentation which tells me to use the /s and /m 
switches - but I can't get the desired results.

The above example does not seem to do anything at all - it doesn't throw 
an error or give me any feed back.

What am I doing wrong ????

Any help appreciated.

Regards Arie
------------------------------------------------------------------
 For the concert of life, nobody has a program.
------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: multipart/alternative
Size: 1 bytes
Desc: not available
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20081026/b8838457/attachment.bin>
-------------- next part --------------

No virus found in this outgoing message.
Checked by AVG - http://www.avg.com 
Version: 8.0.175 / Virus Database: 270.8.3/1744 - Release Date: 10/24/2008 6:08 PM


More information about the plug mailing list