reg expression for stripping Java scrips off HTML?

From: Date: Wed, 16 Oct 2002 09:44:03 +0000
Subject: reg expression for stripping Java scrips off HTML?
Groups: php.windows 
Request: Send a blank email to php-windows+get-16396@lists.php.net to get a copy of this message
Can anyone please provide me with the regular expression (Perl compatible or posix extended, whatever), that i can use to strip off the Java script tags and code of the HTML page. i have it 2 types: 1) <script language="javascript" src="***.js"> </script> and 2) <script> ----------code-------- \r\n ----------code-------- \r\n </script> i am using preg_replace("/(?s)<script[^>]{0,}script[*\s]{0,}>/iU", "--stripped--", $myHTMLstring) but this doesnt work properly. respects, YY.

« previous php.windows (#16396) next »