<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[adding incrementing numbers at the end of each line]]></title><description><![CDATA[<p dir="auto">so i have a file like this.<br />
1111111111:<br />
2222222222:<br />
3333333333:<br />
4444444444:<br />
5555555555:<br />
i want to put incrementing numbers from 10 to 20 at the end of each line like this<br />
1111111111:10<br />
1111111111:11<br />
1111111111:12<br />
1111111111:13<br />
.<br />
.<br />
.<br />
1111111111:20<br />
2222222222:10<br />
2222222222:11<br />
2222222222:12<br />
2222222222:13<br />
.<br />
.<br />
.<br />
.2222222222:20<br />
and so on.<br />
is there any way to do it ?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/17227/adding-incrementing-numbers-at-the-end-of-each-line</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 23:53:11 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/17227.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 Mar 2019 18:14:29 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to adding incrementing numbers at the end of each line on Mon, 04 Mar 2019 22:14:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> said:</p>
<blockquote>
<p dir="auto">we could generalize the process</p>
</blockquote>
<p dir="auto">I REALLY like that regex, however I wonder if it would be worth it as in the OP’s situation it would be a toss up as to whether my regex or your’s is the easier to set up.</p>
<p dir="auto">The power (and beauty) of your regex lies with the shortness of code, and I should say it’s generalization. Even if there were say 50 numbers to be used (50-99), your regex still looks good, mine on the other hand becomes unwieldy.</p>
<p dir="auto">Thanks for the enlightenment<br />
Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/40645</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/40645</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Mon, 04 Mar 2019 22:14:31 GMT</pubDate></item><item><title><![CDATA[Reply to adding incrementing numbers at the end of each line on Mon, 04 Mar 2019 21:56:05 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/rana-jawad" aria-label="Profile: rana-jawad">@<bdi>rana-jawad</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: terry-r">@<bdi>terry-r</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">I think that we could <strong>generalize</strong> the process in order to match <strong>other</strong> texts or <strong>number</strong> of lines !</p>
<p dir="auto">I’ve thought about this general <strong>template</strong>  :</p>
<pre><code class="language-diff">\h*   Val_1   SP+   Val_2  SP+  Val_3   SP+  Val_4  SP+ ............. SP+  Val_N   TAB+   REPEATED text
</code></pre>
<p dir="auto">where :</p>
<ul>
<li>
<p dir="auto">The <strong>first</strong> value <strong><code>Val_1</code></strong> can be <strong>preceded</strong> with possible <strong>horizontal blank</strong> characters</p>
</li>
<li>
<p dir="auto">The different values <strong><code>Val_1</code></strong>, <strong><code>Val_2</code></strong>, <strong><code>Val_3</code></strong>, etc…, are <strong>separated</strong> with, at least, <strong><code>1</code></strong> <strong>space</strong> character</p>
</li>
<li>
<p dir="auto">After the <strong>last</strong> value <strong><code>Val_N</code></strong> , there is, at least, <strong><code>1</code></strong> <strong>tabulation</strong> character, as a <strong>separator</strong></p>
</li>
<li>
<p dir="auto">Finally each line <strong>ends</strong> with some <strong>text</strong>, which will be <strong>repeated</strong> <strong><code>N</code></strong> times, at <strong>beginning</strong> of the <strong>replaced</strong> lines</p>
</li>
</ul>
<p dir="auto">Now, let’s assume this <strong>initial</strong> text :</p>
<pre><code class="language-diff">		  10 11 12 13 14 15 16 17 18 19 20		1111111111:
100 110 120 130 140 150							ABCDE = -
10 11 12 13 14 15 16 17 18 19 20				2222222222:
		  Test									A small 
    A    B CDE     F GH I						Upper Letters:
05 05 05 05 05 04 04 04 04 03 03 03 02 02 01	Hesitant Countdown --&gt; 
</code></pre>
<p dir="auto">With this <strong>regex</strong> S/R :</p>
<p dir="auto">SEARCH <strong><code>(?-s)^\h*(\w+)(?=.*\t+(.+))|^\t.+\R?</code></strong></p>
<p dir="auto">REPLACE <strong><code>?1\2\1\r\n</code></strong></p>
<p dir="auto">You would obtain :</p>
<pre><code class="language-diff">1111111111:10
1111111111:11
1111111111:12
1111111111:13
1111111111:14
1111111111:15
1111111111:16
1111111111:17
1111111111:18
1111111111:19
1111111111:20
ABCDE = -100
ABCDE = -110
ABCDE = -120
ABCDE = -130
ABCDE = -140
ABCDE = -150
2222222222:10
2222222222:11
2222222222:12
2222222222:13
2222222222:14
2222222222:15
2222222222:16
2222222222:17
2222222222:18
2222222222:19
2222222222:20
A small Test
Upper Letters:A
Upper Letters:B
Upper Letters:CDE
Upper Letters:F
Upper Letters:GH
Upper Letters:I
Hesitant Countdown --&gt; 05
Hesitant Countdown --&gt; 05
Hesitant Countdown --&gt; 05
Hesitant Countdown --&gt; 05
Hesitant Countdown --&gt; 05
Hesitant Countdown --&gt; 04
Hesitant Countdown --&gt; 04
Hesitant Countdown --&gt; 04
Hesitant Countdown --&gt; 04
Hesitant Countdown --&gt; 03
Hesitant Countdown --&gt; 03
Hesitant Countdown --&gt; 03
Hesitant Countdown --&gt; 02
Hesitant Countdown --&gt; 02
Hesitant Countdown --&gt; 01
</code></pre>
<p dir="auto"><strong>Nice</strong>, isn’t it !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/40644</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/40644</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 04 Mar 2019 21:56:05 GMT</pubDate></item><item><title><![CDATA[Reply to adding incrementing numbers at the end of each line on Mon, 04 Mar 2019 19:22:11 GMT]]></title><description><![CDATA[<p dir="auto">thank you so much. it worked like charm</p>
]]></description><link>https://community.notepad-plus-plus.org/post/40639</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/40639</guid><dc:creator><![CDATA[Rana Jawad]]></dc:creator><pubDate>Mon, 04 Mar 2019 19:22:11 GMT</pubDate></item><item><title><![CDATA[Reply to adding incrementing numbers at the end of each line on Mon, 04 Mar 2019 19:04:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rana-jawad" aria-label="Profile: Rana-Jawad">@<bdi>Rana-Jawad</bdi></a><br />
Before you use the regex (below) please add 1 additional line to the bottom of the file, this makes the regex easier to code. So Ctrl-End key combo, then hit enter (return) key once.<br />
So the regex to duplicate each line 10 additional times, each with it’s own incrementing number is, using the Replace function.<br />
Find What:<code>(\d+:)(\R)</code><br />
Replace With:<code>\110\2\111\2\112\2\113\2\114\2\115\2\116\2\117\2\118\2\119\2\120\2</code></p>
<p dir="auto">As this is a regex (regular expression) the search mode MUST be ‘regular expression’ and have wrap around ticked.</p>
<p dir="auto">Last step is to remove that last line at the bottom of the file.</p>
<p dir="auto">Please let me know how you get on.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/40638</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/40638</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Mon, 04 Mar 2019 19:04:29 GMT</pubDate></item><item><title><![CDATA[Reply to adding incrementing numbers at the end of each line on Mon, 04 Mar 2019 18:35:06 GMT]]></title><description><![CDATA[<p dir="auto">i have file like this<br />
1111111111:<br />
2222222222:<br />
3333333333:<br />
4444444444:<br />
5555555555:<br />
i have not duplicated each lines 11 times.<br />
and i want incremented number from 10 to 20 after each line</p>
]]></description><link>https://community.notepad-plus-plus.org/post/40636</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/40636</guid><dc:creator><![CDATA[Rana Jawad]]></dc:creator><pubDate>Mon, 04 Mar 2019 18:35:06 GMT</pubDate></item><item><title><![CDATA[Reply to adding incrementing numbers at the end of each line on Mon, 04 Mar 2019 18:33:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rana-jawad" aria-label="Profile: Rana-Jawad">@<bdi>Rana-Jawad</bdi></a> said:</p>
<blockquote>
<p dir="auto">i want to put incrementing numbers from 10 to 20</p>
</blockquote>
<p dir="auto">From your example it would appear that for each line you originally have you want to copy that 10 extra times (?, 10-20 inclusive) and each line will have that incremented number after a <code>:</code>. Is that correct?</p>
<p dir="auto">Or does the file already have ALL lines, and you just want the incremented number behind each?</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/40635</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/40635</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Mon, 04 Mar 2019 18:33:09 GMT</pubDate></item></channel></rss>