2

Using Notepad++ I want to replace :

All strings like "pk": x with "pk": x+1 where x is a positive number.

"pk": 42 would become "pk": 43.

Is there a regex that can suit my needs ?

Ellone
  • 3,644
  • 12
  • 40
  • 72
  • 7
    [See this solution](http://stackoverflow.com/questions/25428620/regular-expression-notepad-increment-numbers-in-every-line). – Jesse Good Jan 28 '16 at 12:55
  • 1
    Or [this](https://stackoverflow.com/questions/7602816/notepad-incrementally-replace) – Enissay Jan 28 '16 at 12:56
  • 1
    In [Funduc S&R tool](http://www.funduc.com/regexp.htm#Regular%20Expression%20Counters), you can use `"pk": +[0-9]` and replace with `"pk": %1>` if you have those values from 1. You can safely replace/increment the values in any regular programming language inside a callback replace function. – Wiktor Stribiżew Jan 28 '16 at 13:23

0 Answers0