Sublime Text Search并在报价中插入内容

abh*_*jit 7 regex sublimetext sublimetext2

原版的:

description: Hello World
description: Hello India
description: Hello Guys
Run Code Online (Sandbox Code Playgroud)

我在yaml文件中有20000行,我想搜索并将描述内容放在双引号中,描述内容各不相同

我想要:

description: "Hello World"
description: "Hello India"
description: "Hello Guys"
Run Code Online (Sandbox Code Playgroud)

那么这件事是可行的,如果有的话,你能告诉我怎么样?

谢谢.

Ric*_*tti 14

您可以使用带有查找和替换的正则表达式(menu:find/replace).在查找框中键入:

description: (.*)
Run Code Online (Sandbox Code Playgroud)

在替换盒中:

description: "$1"
Run Code Online (Sandbox Code Playgroud)

然后按更换.

请记住选择"正则表达式"框:

在此输入图像描述