php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #42730 PREG Named Subpattern Syntax Wrong In Docs
Submitted: 2007-09-21 18:47 UTC Modified: 2007-09-24 08:08 UTC
From: php at finalresort dot org Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at finalresort dot org
New email:
PHP Version: OS:

 

 [2007-09-21 18:47 UTC] php at finalresort dot org
Description:
------------
In the documentation for PCRE, Pattern Syntax, there is a bug. Searching 
for "named subpatterns", we find:

"Since PHP 4.3.3, (?1), (?2) and so on can be used for recursive 
subpatterns too. It is also possible to use named subpatterns: (?
P>foo)."

The syntax mentioned for named subpatterns is incorrect. The correct 
syntax is:

(?P<name>pattern)

Example URL to the documentation: http://us.php.net/manual/en/
reference.pcre.pattern.syntax.php


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-24 08:08 UTC] rquadling@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:10 UTC] phpdocbot@php.net
Automatic comment on behalf of rquadling
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=f47464539088da2819ce6e8d6ca059b71d80229b
Log: Fix #42730
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 12:00:01 2026 UTC