純粋に学術的ですが、それは私をイライラさせます。
このテキストを修正したい:
there there are are multiple lexical errors in this line line
シードを使用。私はこれまでのところ持っています:
sed 's/\([a-z][a-z]*[ ,\n][ ,\n]*\)\1/\1/g' < file.text
最後の 2 倍になった単語以外はすべて修正されます。
there are multiple lexical errors in this line line
sed の第一人者は、上記が最後の単語を扱わない理由を説明できますか?