![Notepad++ で正規表現を使用して、行の最初の出現箇所「,"」を検索し、「,"」に置き換える方法](https://rvso.com/image/1539558/Notepad%2B%2B%20%E3%81%A7%E6%AD%A3%E8%A6%8F%E8%A1%A8%E7%8F%BE%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%97%E3%81%A6%E3%80%81%E8%A1%8C%E3%81%AE%E6%9C%80%E5%88%9D%E3%81%AE%E5%87%BA%E7%8F%BE%E7%AE%87%E6%89%80%E3%80%8C%2C%22%E3%80%8D%E3%82%92%E6%A4%9C%E7%B4%A2%E3%81%97%E3%80%81%E3%80%8C%2C%22%E3%80%8D%E3%81%AB%E7%BD%AE%E3%81%8D%E6%8F%9B%E3%81%88%E3%82%8B%E6%96%B9%E6%B3%95.png)
交換したい1回目の発生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