我要替换(删除)特定的可选单词(AAA,BBB,CCC),这些单词在特定单词(ALWAYS_THERE)前后紧随其后
this is important AAA BBB ALWAYS_THERE CCC
this is important BBB AAA ALWAYS_THERE CCC
this is important AAA CCC ALWAYS_THERE BBB
this is important BBB ALWAYS_THERE CCC AAA
this is important BBB this also ALWAYS_THERE CCC AAA
Run Code Online (Sandbox Code Playgroud)
至
this is important
this is important
this is important
this is important
this is important BBB this also
Run Code Online (Sandbox Code Playgroud)
如何在perl(或UNIX上的任何其他可用程序)中完成此操作?