1

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?

3

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
  • Thanks for this AFSHIN. I found a different solution Find what: (^.*?)\K,"", Replace with: ," ", but this only works if you click Replace All. Yours is defiantly a better solution – user3229980 Aug 26 '17 at 23:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.