SA-MP Forums Archive
Notepad++ regex by adding number in replacing - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Other (https://sampforum.blast.hk/forumdisplay.php?fid=7)
+--- Forum: Everything and Nothing (https://sampforum.blast.hk/forumdisplay.php?fid=23)
+--- Thread: Notepad++ regex by adding number in replacing (/showthread.php?tid=566378)



Notepad++ regex by adding number in replacing - AroseKhanNiazi - 05.03.2015

How can I do that if an object is replaced multiple times the number adds in it. For example
pawn Код:
LobbyObject[8]
I use it to replace if it is replace once it adds
pawn Код:
LobbyObject[8]
But next times it is replaces another variable it should replace it by
pawn Код:
LobbyObject[9]
then next time
pawn Код:
LobbyObject[10]



Re: Notepad++ regex by adding number in replacing - KingHual - 05.03.2015

you can't


Re: Notepad++ regex by adding number in replacing - Mauzen - 05.03.2015

http://stackoverflow.com/questions/7...ntally-replace

This might help
First replace with a constant index that has the maximum needed number of digits, then proceed as described on the link. This wont work if the lines arent directly in a row however.


Re: Notepad++ regex by adding number in replacing - AroseKhanNiazi - 05.03.2015

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
http://stackoverflow.com/questions/7...ntally-replace

This might help
First replace with a constant index that has the maximum needed number of digits, then proceed as described on the link. This wont work if the lines arent directly in a row however.
thanks but this won't help me anyway i did it with a long time consuming way.

Edit it just got use full coz i need this to add numbers in line today


Re: Notepad++ regex by adding number in replacing - Misiur - 06.03.2015

Notepad++ has "macros", you can use it to record yourself doing thing once, then just play it and it'll repeat as many times as you want. Though I don't know if there's possiblilty to increase a number, in sublime I had to download a plugin for that...


Re: Notepad++ regex by adding number in replacing - AroseKhanNiazi - 06.03.2015

thanks


Re: Notepad++ regex by adding number in replacing - Vince - 06.03.2015

You can also install the TextFX plugin if you don't have it already. Then use TextFX > Tools > Insert lines numbers.


Re: Notepad++ regex by adding number in replacing - AroseKhanNiazi - 06.03.2015

Quote:
Originally Posted by Vince
Посмотреть сообщение
You can also install the TextFX plugin if you don't have it already. Then use TextFX > Tools > Insert lines numbers.
Thanks