我有一个包含很多 TeX 标记的文件,如下所示:
The fish ate 20\percent more food than the bear.
The fish ate \the\number\percent more food than the bear.
我想删除作为 TeX 代码的文本,例如\percent并用空格替换它。
- 标记总是以
\. - 标记后始终跟一个空格
{、 或另一个\。 - 文件中的
\其他情况从不使用。
如何删除这些项目的外观,这些项目以空格、 或其他开头\和之后?{\