sub get_proparg_new { my $propstr = shift; # get the property string my $level = shift || return $propstr; # get the level we want to extract if($level == -1) { # special case, get the innermost argument $propstr =~ /\(([^()]+)\)+/; return $1; } else { # get whatever argument $level indicates while ($level--) { $propstr =~ /\((.+)\)/; $propstr = $1; } } return $propstr; }