I have a html page like this
Code:
<script language="vbscript">
some script
</script>

Some text

<script language="vbscript">
some more script
</script>

Some more text
I want to remove the scripts so i used the following code:

Code:
$open = fopen("file.html", "r");
$read = fread($open,  20000);
fclose($open);

$read = eregi_replace("<script>(.*)</script>", "" , $read);
what it outputs is just Some more text. The scripts are gone but along with them the Some text. I dont want some text to be erased.

Please Help,
Thanks in advance,
Rabin