Doc #62428 [PATCH]: PCRE "\g" escape missing "<name>" in documentation

From: Date: Thu, 23 Apr 2015 11:53:16 +0000
Subject: Doc #62428 [PATCH]: PCRE "\g" escape missing "<name>" in documentation
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12236@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62428&edit=1

 ID:                 62428
 Patch added by:     cmb@php.net
 Reported by:        danielklein at airpost dot net
 Summary:            PCRE "\g" escape missing "<name>" in documentation
 Status:             Open
 Type:               Documentation Problem
 Package:            PCRE related
 PHP Version:        5.4.4
 Block user comment: N
 Private report:     N

 New Comment:

The following patch has been added/updated:

Patch Name: angle-brackets
Revision:   1429789995
URL:        https://bugs.php.net/patch-display.php?bug=62428&patch=angle-brackets&revision=1429789995


Previous Comments:
------------------------------------------------------------------------
[2015-04-23 11:52:59] cmb@php.net

Indeed, \g<name> is not documented yet. The feature is available
since 5.2.7.[1]

[1] <http://3v4l.org/tfeSh>

------------------------------------------------------------------------
[2015-04-23 03:34:47] danielklein at airpost dot net

I don't see any change. Where does it say \g<name> in the documentation?

------------------------------------------------------------------------
[2015-04-15 14:15:31] ppaisndud at gmail dot com

Documentation has been fixed, can be closed

------------------------------------------------------------------------
[2012-06-27 01:31:39] danielklein at airpost dot net

Description:
------------
http://www.php.net/manual/en/regexp.reference.back-references.php

PCRE also allows "\g" to use "<name>". I don't know since which
version of PHP, but going by the existing documentation it should have been between 5.2.2 and 5.2.4.
Please make note of this in the documentation.

Test script:
---------------
<?php
var_dump(preg_match('/(?<bar>o)\g<bar>/', 'foo'));
?>

Actual result:
--------------
int(1)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=62428&edit=1


Thread (9 messages)

« previous php.doc.bugs (#12236) next »