Notepad++ Replace regex match for same text plus appending character

You are very near to the answer! What you missed is a capturing group.

Use this regex in "Find what" section:

([0-9]{5})

In "Replace with", use this:

\10

The ( and ) represent a capturing group. This essentially means that you capture your number, and then replace it with the same followed by a zero.


You are very close. You need to add a capturing group to your regex by surrounding it with brackets. ([0-9]{5})

Then use \10 as the replacement. This is replacing the match with the text from group 1 followed by a zero.


You can use \K to reset.

\b\d{5}\b\K

And replace with 0

  • \b matches a word boundary
  • \d is a short for digit [0-9]

See demo at regex101