my $Level0 = qr/ \( ( [^()] )* \) /x; # Parenthesized text my $Level1 = qr/ \( ( [^()] | $Level0 )* \) /x; # One level of nesting my $Level2 = qr/ \( ( [^()] | $Level1 )* \) /x; # Two levels of nesting ----------------------------------------------------------------------------- Copyright 1997-2024 Jeffrey Friedl