How to find 1st occurrence in line of: ,””, and replace with: ,” “, using Notepad++ with regex

find and replacenotepadregex

I want to replace the 1st occurrence on each line using Notepad++ find/replace with Regex.

Find: ,"",

Replace with: ," ",

In other words, insert 2 spaces between the 2 double quotes.

How do I do this?

Best Answer

You can do it as following regex.

  • Find what: ,"",(.*)$
  • Replace with: ," ",\1
  • Search Mode: Regular expression

Input:

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

Expected result:

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