Notepad++ Find/Replace number with Increment Value

It is not possible with just a regex, but you can use a python script inside Notepad++.

Here are the steps:

  • Install Python Script
  • Go to the Plugins -> Python Script -> New Script
  • Select the file name (say, “”)
  • Place this script there:


def increment_after_openparen(match):
    return "({0}".format(str(int(

editor.rereplace(r'\((\d+)', increment_after_openparen)

Then, just evoke this ‘increment_numbers’ script.

Leave a Comment