my $re = '{{(?:[^{}]+|'; $re .= $re x ($nested) . "\b" . ')*}}' x ($nested + 1);
In reply to Re^2: Efficient way to match and replace nested braces (etc.)
by Anonymous Monk
in thread Efficient way to match and replace nested braces (etc.)
by dmn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |