use strict; use warnings; my $string = 'this is (testing 123(test%^*&()() fghfgh(in)))*&^@#%$))))(( ((( (g) 123)a test'; $string =~ s/\(.*\)//gs; print $string;