my $string = "test test %ae, test %ue test, %oe"; my $find = "%(ae|oe|ue)"; my $replace = '#\1;'; # pq's Lorbeeren hinzugefuegt $replace = quotemeta $replace; $replace =~ s/\\\\(\d)/\$$1/g; # meine Beerchen ;) eval "\$string =~ s/$find/$replace/g;";