Bug #17856 Updated: quotemeta() does not escape all correct meta characters
| From: | derick@php.net | Date: | Thu, 20 Jun 2002 06:22:49 +0000 |
| Subject: | Bug #17856 Updated: quotemeta() does not escape all correct meta characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11508@lists.php.net to get a copy of this message | ||
ID: 17856
Updated by: derick@php.net
Reported By: robbat2@orbis-terrarum.net
-Status: Open
+Status: Closed
Bug Type: Regexps related
Operating System: Linux, Apache 2.0.36
PHP Version: 4.1.2
New Comment:
We already have preg_quote for this..
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-06-19 22:05:36] robbat2@orbis-terrarum.net
quotemeta() only escapes:
. \\ + * ? [ ^ ] ( $ )
To properly escape traditional characters for regexps, it is also
nessecary to escape '-' and '|', as the are the range and OR operators
respectively.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17856&edit=1