で区切られたいくつかの文の途中に文字列を追加する必要があります\n
。例えば:
INPUT OUTPUT
V2+count -> V2+came+count
V6+num -> V6+came+num
V10+hi+town -> V10+came+hi+town
と
N2+hello -> N2+went+hello
N7+time -> N7+went+time
これまでに書いたコードは
if ($new=~/\(came\)\|\(went\)/) {
my $prev_tag = $`;
if ($prev_tag5=~ /\(V\d+?\)?\+$/) {
$new=~ s/\(came\)\|//;
} else {
$new=~s/\(went\)\|//;
}
}