|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-04-26 17:14 UTC] andrei@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 08:00:02 2025 UTC |
$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