【发布时间】:2020-04-27 13:24:14
【问题描述】:
BBEdit 13 中的新文本工厂。
我知道如何在“查找和替换”窗口中按下 EXTRACT 按钮,但不知道如何将提取作为文本工厂中的步骤之一。
有可能吗?
【问题讨论】:
BBEdit 13 中的新文本工厂。
我知道如何在“查找和替换”窗口中按下 EXTRACT 按钮,但不知道如何将提取作为文本工厂中的步骤之一。
有可能吗?
【问题讨论】:
从 BBEdit 13.1 开始,这可以在文本工厂中使用“删除不匹配的文本”步骤来完成。借用变更说明:
This operation works similarly to using the Extract button
in the Find window; but rather than creating a new document with
the extracted text, the document's contents are **replaced** with
the results.
Thus, using this operation will delete any text which was **not**
matched by the search string (or pattern), and the remaining text in
the document will consist of all matches of the search string (or
pattern), separated by line breaks. As with the Extract operation,
this is not terribly useful for literal matches, but quite powerful
when using Grep and a suitable replacement pattern.
【讨论】: