Add Counter replacements ?
-
Hello here…
Is it possible to add a counter as replacement ?<ID=1>
For i = 1 to 500
replace <ID=1> with <ID=i>??? Is that possible ? Or as a Macro ?
Daniel
-
It is possible with scripting. For example, one can achieve it by using the PythonScript plugin.
This topic has come up before. Here are some references, some of which will have example scripts:
- https://community.notepad-plus-plus.org/topic/21511/add-counter-replacements
- https://community.notepad-plus-plus.org/topic/19414/replace-text-with-incremented-counter
- https://community.notepad-plus-plus.org/topic/15318/replace-text-with-incremented-counter
- https://community.notepad-plus-plus.org/topic/12967/replace-string-across-multiple-files-and-increment-value
- https://community.notepad-plus-plus.org/topic/16245/find-and-replace
- https://community.notepad-plus-plus.org/topic/16307/need-regex-for-incremental-by-1
- https://community.notepad-plus-plus.org/topic/12301/replace-text-with-incremented-counter
- https://community.notepad-plus-plus.org/topic/19721/formula-in-replace-function
- https://community.notepad-plus-plus.org/topic/20462/how-to-append-the-numbers-with-specific-string
- https://community.notepad-plus-plus.org/topic/20575/repeating-code-with-increment-in-time
- https://community.notepad-plus-plus.org/topic/20604/find-replace-and-count
- https://community.notepad-plus-plus.org/topic/20676/add-increment-number-end-of-word