From: [EMAIL PROTECTED]
Operating system: Win2K & Linux
PHP version: 4.0.4pl1
PHP Bug Type: PCRE related
Bug description: Recursive patterns don't work
$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
--
Edit Bug report at: http://bugs.php.net/?id=10516&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]