my $term = '1+2*(4+2*(1+3))'; my ( $klammer ) = $term =~ /(\([^()]*\))/; print "term: $term\nklammer: $klammer\n";