my $string = q{"2","T,E,S,T,B","Lazowsky","Mike's","Teststring"}; $string =~ s< (,[A-Z]) > < (local $a = $1) =~ tr/,//d; $a >gex;