use strict; use warnings; use Encode; my $regex_notiz = decode("UTF-8",'[^a-z!/()=?_üäöß:.,\-+ \d$%]'); my $text = decode("UTF-8",'!"§$%&/()=?_und überhaupt:;,GROßÖÄÜß.+und ziffern 0123456789-und kleinöäüß%$'); $text =~ s/$regex_notiz//ig; print "neu: >$text<\n";