Bug #10516 Updated: Recursive patterns don't work
| From: | andrei@php.net | Date: | Thu, 26 Apr 2001 21:14:24 +0000 |
| Subject: | Bug #10516 Updated: Recursive patterns don't work | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52545@lists.php.net to get a copy of this message | ||
ID: 10516
Updated by: andrei
Reported By: martijn@ideeweb.nl
Old-Status: Open
Status: Closed
Bug Type: PCRE related
PHP Version: 4.0.4pl1
Assigned To:
Comments:
The results you get are consistent with (?R) description in PCRE docs. If you have a problem with
that, contact the PCRE library author, please.
Previous Comments:
---------------------------------------------------------------------------
[2001-04-26 17:05:56] martijn@ideeweb.nl
$s = "a(b(c)d)e(f)g";
$p = "/( ( ( (?>[^()]+) | (?R) )* ) )/xU";
if (preg_match_all($p, $s, $x)) {
echo "match";
// see what's in $x
} else {
echo "no match";
}
This example pattern is taken straigh out of the PCRE docs, but I don't get the desired result,
whatever I try. I haven't been able to succesfully use the experimental (?R) so I was wondering
if anyone ever has.
In perl, recursive patterns seem to work fine by the way.
Regards,
Martijn
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10516&edit=2