in reply to Re: Text::Balanced with nested / custom brackets
in thread Text::Balanced with nested / custom brackets

It's worth noting that ikegami's code is essentially a derivation of code in perlre for matching balanced parens:
$re = qr{ \( (?: (?> [^()]+ ) # Non-parens without backtracking | (??{ $re }) # Group with matching parens )* \) }x;