php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #43575 PCRE Pattern Syntax - Recursion
Submitted: 2007-12-12 07:45 UTC Modified: 2007-12-12 10:14 UTC
From: josephk at etelos dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
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: josephk at etelos dot com
New email:
PHP Version: OS:

 

 [2007-12-12 07:45 UTC] josephk at etelos dot com
Description:
------------
The documentation for referencing a named pattern for recursion is incorrect.

From the documentation at http://us.php.net/manual/en/reference.pcre.pattern.syntax.php:
----
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<name>foo). 
----

Subpatterns are referenced for recursion as (P?>name), not (?P<name>foo).



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-12-12 10:14 UTC] felipe@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.

* (?P>name)

This already was fixed.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 00:00:01 2026 UTC