#26524 [Opn->Bgs]: eregi_replace and backslash
| From: | derick@php.net | Date: | Thu, 04 Dec 2003 15:21:17 +0000 |
| Subject: | #26524 [Opn->Bgs]: eregi_replace and backslash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-51698@lists.php.net to get a copy of this message | ||
ID: 26524
Updated by: derick@php.net
Reported By: boccara at netvision dot net dot il
-Status: Open
+Status: Bogus
Bug Type: Reproducible crash
Operating System: win2k server sp4
PHP Version: 4.3.3
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
.
Previous Comments:
------------------------------------------------------------------------
[2003-12-04 10:18:31] boccara at netvision dot net dot il
Description:
------------
the eregi_replace seems to have a problem with replacing backslach.
I made a function that should replace a \ with \\
and I got this error message:
<b>Warning</b>: eregi_replace(): REG_EESCAPE:Ptrailing backslash (\)
in ....
Reproduce code:
---------------
function JavascriptEncode($str1)
{
$str1 = eregi_replace(chr(92),chr(92).chr(92),$str1);
return $str1;
}
this fonction doesn't work.
function JavascriptEncode($str1)
{
$str1 = eregi_replace(chr(92).chr(92),chr(92).chr(92),$str1);
return $str1;
}
this fonction replace \ by \\ ( it works, but why ???)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26524&edit=1