#26678 [Opn->Bgs]: preg_quote doesn't quote forward slashes
| From: | eru@php.net | Date: | Sat, 20 Dec 2003 07:50:20 +0000 |
| Subject: | #26678 [Opn->Bgs]: preg_quote doesn't quote forward slashes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52334@lists.php.net to get a copy of this message | ||
ID: 26678
Updated by: eru@php.net
Reported By: gnif at spacevs dot com
-Status: Open
+Status: Bogus
Bug Type: *Regular Expressions
Operating System: Debain
PHP Version: 4.3.2
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
see http://www.php.net/preg_quote
echo preg_quote($file, "/");
Previous Comments:
------------------------------------------------------------------------
[2003-12-19 21:58:20] gnif at spacevs dot com
Description:
------------
if you use preg_quote to escape a string with forward slashes in it, it
doesn't quote them.
Reproduce code:
---------------
$file = 'pages/box/test.php';
echo preg_quote($file);
Expected result:
----------------
pages\/box\/test\.php
Actual result:
--------------
pages/box/test\.php
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26678&edit=1