Replace ) in Notepad++

69 Views Asked by At

How do I replace ) when it comes after 1, 2, or 3 digits (not chars, and without removing the digit(s) themselves)?

2

There are 2 best solutions below

3
Josh Withee On

Find what: ((?<!\d)\d{1,3})\)

Replace with: $1

This ensures that the ) comes after 1 to 3 digits (no more, no less).

Just append your replacement text to the end of $1. For example, if you want to replace it with the word TEST, your replacement would be $1TEST

2
Tommaso Belluzzo On

As simple as:

  • Find: ((^|[^\d])\d{1,3})\)
  • Replace \1

And don't forget to enable te regular expressions in the panel.

Visit this link to try a working demo.