From: jzumbrun at gmail dot com
Operating system: OsX 10.6.1
PHP version: 5.3.1
PHP Bug Type: Regexps related
Bug description: preg_match() error
Description:
------------
// $line equals line below from file:
$route['infox/(.*)'] = "articles/$1";
Basically I have to manually put an \ in front of the / char after infox.
preg_quote() wont escape it and the documentation doesnt say i need to
escape / chars. preg_match() is forcing me to put one there.
Reproduce code:
---------------
---
>From manual page: function.preg-quote
---
$urlClass = '\$route\['infox'/\(\.\*\)'\]';
preg_match("/$urlClass/", $line);
Expected result:
----------------
no errors
Actual result:
--------------
Message: preg_match() [function.preg-match]: Unknown modifier '\'
if i use $urlClass = '\$route\['infox'\/\(\.\*\)'\]';
it works (notice the \ infront of the 3rd char after infox)
--
Edit bug report at http://bugs.php.net/?id=50615&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=50615&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=50615&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=50615&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=50615&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=50615&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=50615&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=50615&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=50615&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=50615&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=50615&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=50615&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=50615&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=50615&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=50615&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50615&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50615&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=50615&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=50615&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=50615&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=50615&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=50615&r=mysqlcfg