如何使用 Notepad++ 和正規表示式來尋找行中第一個出現的位置: ,"" 並替換為: ," "

如何使用 Notepad++ 和正規表示式來尋找行中第一個出現的位置: ,"" 並替換為: ," "

我想更換第一次出現在每一行上使用 Notepad++ 查找/替換為正規表示式。

尋找: ,"",

用。," ",

換句話說,在 2 個雙引號之間插入 2 個空格。

我該怎麼做呢?

答案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

相關內容