Add character to every number via Regex in Notepad++
You almost got it right.
You want to search for ([0-9]+)
And replace that with $1c
You use ( )
to create a capture group, so $1 works.
Alternatively, you can replace with $0c
instead, then you don't need to use a capture group.
- Ctrl+H
- Find what:
\d+
- Replace with:
$0c
- check Wrap around
- check Regular expression
- Replace all
Result for given example:
This is 5c a test!
This 3c is a test!
This is a 9c test!