Search code examples
regexnotepad++quote

How to find single quotes and replace them by two single quotes in Notepad++?


I need to find single quotes in the text and replace them by two single quotes like this for instance :

l'arbre

=>

l''arbre

There are already a lot of places with two single quotes in the text, so I can't just use the find/replace function because it will pick up all those two single quotes together and they should stay so, without being modified.

Does anyone know how to do this ? I think I have to use regular expression but none that I've tried so far really work.

Thanks !


Solution

  • Press ctrl + h and in normal mode (no regex) :

    1) replace ' by ''

    2) replace '''' by ''