ID: 27705 Updated by: [EMAIL PROTECTED] Reported By: bartwared2 at planet dot nl -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux, apache 1.3.29 PHP Version: 4.3.4 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. You need to use \\\\ instead of \\. Previous Comments: ------------------------------------------------------------------------ [2004-03-25 15:51:37] bartwared2 at planet dot nl Description: ------------ I have been trying to get the eregi_replace function to remove \\ from my string. I have also tried ereg_replace. Every time I try to it fails. This *is* a bug.In http://bugs.php.net/bug.php?id=26524 was said that it isn't, but I'm sure it is. We all know, to print a \ on the screen we can use this: print("\\"); This works, ofcourse. Try it. But when you try to use eregi_replace to replace a \, it will give the following error: Warning: eregi_replace(): REG_EESCAPE in /where-ever.php on line 5 There is nothing diffrent from my host to any others, and more people have this problem, I think. Try this: <?php $description = "Hi, \\how are you?"; $description = eregi_replace("\\", " ", $description); ?> Reproduce code: --------------- $description = "Hi, \\how are you?"; $description = eregi_replace("\\", " ", $description); Expected result: ---------------- I expected $description to become "Hi, how are you", but instead of that I got... Actual result: -------------- Warning: eregi_replace(): REG_EESCAPE in /home/bartware/public_html/bart-ware.com/admin.php on line 188 Line 188 is: $description = eregi_replace("\\", " ", $description); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27705&edit=1
