It's a bug. Try the latest CVS, it has been fixed.
Shaun Thomas wrote:
>
> This only applies to PHP 4.0.4
>
> Back with PHP 4.0.2, I could do this:
>
> <?PHP
> $string = "[[";
> $string = preg_replace("/(\W)/", "\\\\1", $string);
> ?>
>
> $string would then contain "\[\[".
>
> Now, if I use that same code, $string contains "\\1\\1\\1\\1".
>
> I tried to compensate for this using PHP's new ability to allow
> perl syntax in the replace section.
>
> <?PHP
> $string = "[[";
> $string = preg_replace("/(\W)/", "\\$1", $string);
> ?>
>
> That leaves $string with "\$1\$1\$1\$1". Which tells me it thought
> I was backreferencing the $. So, to combat said assumption, I tried
> three, four, even five slashes in front of $1, and nothing worked.
> All I got were variations of "\$1\$1\$1\$1".
>
> I have to assume this is a bug, since this worked back in 4.0.2 which
> I stopped using due to segfaults under certain circumstances.
>
> Ideas?
>
> --
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
> | Shaun M. Thomas INN Database Programmer |
> | Phone: (309) 743-0812 Fax : (309) 743-0830 |
> | Email: [EMAIL PROTECTED] AIM : trifthen |
> | Web : hamster.lee.net |
> | |
> | "Most of our lives are about proving something, either to |
> | "ourselves or to someone else." |
> | -- Anonymous |
> +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
>
> --
> 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]
--
Monte Ohrt <[EMAIL PROTECTED]>
http://www.ispi.net/
--
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]