#50720 [Csd->Bgs]: Named subpatterns are not working with the syntax ?<name> or ?'name', only wor
| From: | scottmac@php.net | Date: | Mon, 11 Jan 2010 19:05:49 +0000 |
| Subject: | #50720 [Csd->Bgs]: Named subpatterns are not working with the syntax ?<name> or ?'name', only wor | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146551@lists.php.net to get a copy of this message | ||
ID: 50720
Updated by: scottmac@php.net
Reported By: andrew at coolboxcreative dot com
-Status: Closed
+Status: Bogus
Bug Type: Regexps related
Operating System: Linux
PHP Version: 5.2.12
Previous Comments:
------------------------------------------------------------------------
[2010-01-11 17:58:48] andrew at coolboxcreative dot com
The PCRE library is indeed an older version, so presume bug is down to
that
------------------------------------------------------------------------
[2010-01-11 16:39:14] scottmac@php.net
Check your phpinfo for the version of the PCRE library, I'm guessing
that the Redhat version is using an old copy from the system and not the
bundled PHP version.
------------------------------------------------------------------------
[2010-01-11 16:33:37] andrew at coolboxcreative dot com
Description:
------------
Named subpatterns are not working with the syntax ?<name> or ?'name',
only working with ?P<name>
The newer syntax's work with version 5.2.9-2 (on windows) and 5.2.11
(linux), but not version 5.2.12 (red hat)
Reproduce code:
---------------
http://www.coolboxcreative.com/demo/php_bug/source.txt
Expected result:
----------------
id =
classes = test_class
id = div_two
classes = another_class
Actual result:
--------------
nothing outputted
nb. in the application I am using this in I get the following error:
Compilation failed: unrecognized character after (?< at offset 7' in
....
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50720&edit=1