In article <9eb4nf$pdf$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Plutarck") wrote:
> $file = eregi_replace("<script.*>.*</script>", "<!-- RWW: Scripting
> killed -->", $file);
>
> But I use PCRE functions, so I don't want to use ereg in one place and PCRE
> in another, so I tried:
>
> $file = preg_replace("#<script.*>.*</script>#i", "<!-- RWW: Scripting
> killed -->", $file);
>
> Thing is, that doesn't work. And I don't know why.
pregs are greedy by default, while eregs are ungreedy by default. If you
make your preg ungreedy (using the "U" modifier), do you get a result more
consisent with the ereg's?
--
CC
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]