Re: What's wrong with this code?
| From: | Christian Reiniger | Date: | Mon, 21 May 2001 18:27:51 +0000 |
| Subject: | Re: What's wrong with this code? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53751@lists.php.net to get a copy of this message | ||
On Monday 21 May 2001 16:23, Plutarck wrote:
> Since there is a "/" in the code itself, I use "#" as a delimiter
> instead so I don't have to escape it, making it harder to read.
>
> So here's the code:
>
> $file = preg_replace("#<script.*>.*</script>#Ui", "<!-- RWW:
> Scripting
> killed -->", $file);
Stupid error (noticed this after trying for ~10 minutes...):
Add the "s" modifier. Otherwise "." doesn't match newlines.
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
Error 032: Recursion error - see error 032