1
I want to increment numbers which are written like this:
add(1 )
or add( 1)
, but not like this add(1)
. I have one code that works in Notepad++ with Python Script plugin but it increments all numbers:
import re
def calculate(match):
return '%s' % (str(int(match.group(1)) + 1))
editor.rereplace('(\d+)', calculate)
Also, would be very good to know how to increment numbers in only add(1 )
, only add( 1)
, only add(1)
cases.
You can suggest me any software, not particularly Notepad++.
Thank you! Very clear explanation. – vasik988 – 2020-02-05T10:42:56.723
@vasik988: You're welcome, glad it helps. – Toto – 2020-02-05T10:44:15.473