Add Increment Number End Of Word
-
Hi, new here and seeking for help. I want to add numbers at the end of this word > valueMe
<tr>
<td>TITLE</td>
<td><input class=“inputB” value=“” id=“valueMe” ></input></td>
<td><input class=“inputB” value=“” id=“valueMe” ></input></td>
<td><input class=“inputB” value=“” id=“valueMe” ></input></td>
</tr>
<tr>
<td>TITLE2</td>
<td><input class=“inputB” value=“” id=“valueMe” ></input></td>
<td><input class=“inputB” value=“” id=“valueMe” ></input></td>
<td><input class=“inputB” value=“” id=“valueMe” ></input></td>
</tr>Using ALT + SHIFT not working for this, there will be numbers in the empty lines instead of behind the text valueMe.
Does this can be done in Notepad++? I want it to be like this:
<tr>
<td>TITLE</td>
<td><input class=“inputB” value=“” id=“valueMe1” ></input></td>
<td><input class=“inputB” value=“” id=“valueMe2” ></input></td>
<td><input class=“inputB” value=“” id=“valueMe3” ></input></td>
</tr>
<tr>
<td>TITLE2</td>
<td><input class=“inputB” value=“” id=“valueMe4” ></input></td>
<td><input class=“inputB” value=“” id=“valueMe5” ></input></td>
<td><input class=“inputB” value=“” id=“valueMe6” ></input></td>
</tr>Thanks,
-
@Bot-Spaces said in Add Increment Number End Of Word:
I want to add numbers at the end of this word
Yes, but not easily with a regular expression (regex) and the use of the “number to insert” available under the “Edit” menu, Column Editor.
One idea would entail adding a whole lot of numbers to the end of the file, then cutting off a number and inserting it behind the next “valueMe” string. The regex to perform this cut and paste would need to run for as many of the strings that occur. All up a considerable amount of work.
However by using one of the supporting scripting languages (Pythonscript tops that list) someone who was proficient in that might be able to conjure up a quick few lines of code to do it. That’s not me, although I do believe there are various snippets of code already supplied in this forum, that if one looked for them they could be easily adapted to solve this.
Terry
-
@Terry-R said in Add Increment Number End Of Word:
although I do believe there are various snippets of code already supplied in this forum, that if one looked for them they could be easily adapted to solve this.
It turned out that such a question has already been answered and I was involved in an alternate solution using only regex (not recommended as much massaging of the data). Have a look at:
https://community.notepad-plus-plus.org/topic/20462/how-to-append-the-numbers-with-specific-string
See if it helps in any way.Cheers
Terry