$ cat in.txt a b « x1 x2 » c d « x2 » e f « x3 x4 x5 » g h « x1 \« x2 \» x3 » $ perl -wMstrict -MRegexp::Common=delimited -CSD -ple \ 's{$RE{delimited}{-keep}{-delim=>qq{\N{U+AB}}}{-cdelim =>qq{\N{U+BB}}}}{ my ($x,$y,$z)=($2,$3,$4); $y=~s/(?