Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
{(?>[^{}]|(?R))*\}
/
gm
Input 1
1
New
Why is preg_match_all not working? $pattern = '/\{(?:[^{}]|(?R))*\}/'; $result = 161240 characters if (preg_match_all($pattern, $result, $matches)){ { echo 'Success'; } else { echo 'Not working'; } }
Extraction