ID: 12140
Updated by: andrei
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: PCRE related
Operating System: 
PHP Version: 4.0.6
New Comment:

That's right. Your  \\\\\\\\ turns into \\\\ by the time PHP string parsing is done 
with it. Then the extension looks at it and sees two escaped backslashes so that's 
what you get - two backslashes.

In general, use str_replace() for things like that.

Previous Comments:
------------------------------------------------------------------------

[2001-07-13 08:51:59] [EMAIL PROTECTED]

task: 
need replace \ (one) to \\\\ (four)

On php.4.0.5 work:
$val1=preg_replace('/\\\/',"\\\\\\\\",$val);

On php 4.0.6 work:
$val1=preg_replace('/\\\/',"\\\\\\\\\\\\\\\\",$val);


------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=12140&edit=1


-- 
PHP Development 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]

Reply via email to