use Regexp::Common qw /balanced/; /($RE{balanced}{-parens=>’()’})/ and print $1;