Search code examples
regexnotepad++

How to convert in Notepad++ using regular expressions?


How to convert Ctrl+(any letter) to «Ctrl+(any letter)»?

I need like this:

Ctrl+T
Ctrl+D
etc.

Convert to:

«Ctrl+T»
«Ctrl+D»
etc.

I tried replacing this (Ctrl\+.) with (Ctrl\+[a-zA-Z]), but the result is Ctrl+[a-zA-Z].


Solution

  • Find what:

    (Ctrl\+[a-zA-Z])
    

    Replace with:

    «\1»
    

    Make sure Search mode 'Regular expression' is selected.