in reply to Strip brackets and contents from string
Updated: Swapped to /s modifier to allow for multiple lines.use strict; use warnings; my $string = 'this is (testing 123(test%^*&()() fghfgh(in)))*&^@#%$))))(( ((( (g) 123)a test'; $string =~ s/\(.*\)//gs; print $string;
|
|---|