如何使用带有正则表达式的 Notepad++ 查找行中第一次出现的:“”,并替换为:“”,

如何使用带有正则表达式的 Notepad++ 查找行中第一次出现的:“”,并替换为:“”,

我想更换第一次出现在每一行上使用 Notepad++ 用 Regex 查找/替换。

寻找: ,"",

用。。。来代替:," ",

换句话说,在两个双引号之间插入两个空格。

我该怎么做呢?

答案1

您可以按照以下正则表达式进行操作。

  • 找什么:,"",(.*)$
  • 用。。。来代替:," ",\1
  • 搜索模式:正则表达式

输入:

this is a ,"", here and another is here ,"", at the end
next ,"",,"", here ,"",
another one ,"",
,"", last one

预期结果:

this is a ,"  ", here and another is here ,"", at the end
next ,"  ",,"", here ,"",
another one ,"  ",
,"  ", last one

相关内容