![如何使用 Notepad++ 和正規表示式來尋找行中第一個出現的位置: ,"" 並替換為: ," "](https://rvso.com/image/1539558/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%20Notepad%2B%2B%20%E5%92%8C%E6%AD%A3%E8%A6%8F%E8%A1%A8%E7%A4%BA%E5%BC%8F%E4%BE%86%E5%B0%8B%E6%89%BE%E8%A1%8C%E4%B8%AD%E7%AC%AC%E4%B8%80%E5%80%8B%E5%87%BA%E7%8F%BE%E7%9A%84%E4%BD%8D%E7%BD%AE%EF%BC%9A%20%2C%22%22%20%E4%B8%A6%E6%9B%BF%E6%8F%9B%E7%82%BA%EF%BC%9A%20%2C%22%20%22.png)
我想更換第一次出現在每一行上使用 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