<?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[Help REPLACING content with incremental order (by +1)]]></title><description><![CDATA[<p dir="auto">Hi folks,</p>
<p dir="auto">In my TXT file I have several lines with the following content:</p>
<pre><code>"HandleId": "1",
"HandleId": "13",
"HandleId": "5",
"HandleId": "2",
"HandleId": "11",
</code></pre>
<p dir="auto">I would like to replace the number in a ascendent incremental order by +1, so the lines above would change to:</p>
<pre><code>"HandleId": "1",
"HandleId": "2",
"HandleId": "3",
"HandleId": "4",
"HandleId": "5",
</code></pre>
<p dir="auto">It seems easy, but imagine that I have thousands of lines in this context.</p>
<p dir="auto">Could someone help me with this, please?</p>
<p dir="auto">best regards,</p>
<p dir="auto">JR</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25307/help-replacing-content-with-incremental-order-by-1</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 00:30:31 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25307.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Jan 2024 14:12:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Help REPLACING content with incremental order (by +1) on Mon, 06 Oct 2025 16:12:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/36971">@samsung-s6-Lite</a> said in <a href="/post/103410">Help REPLACING content with incremental order (by +1)</a>:</p>
<blockquote>
<p dir="auto">using your method I managed to work out how to do it PARTIALLY using this.</p>
<p dir="auto">Find what: SnapRestSeconds = \d+<br />
Replace with: SnapRestSeconds = (?=match)<br />
Search mode: Regular expression</p>
<p dir="auto">This starts them at number at ‘2’ I need it to start at 30 please, can you help?</p>
</blockquote>
<p dir="auto">If it started at 2, then you did one sequential <strong>Replace</strong> with the same replace expression first. That’s OK — just be aware that replacing “continues from where you left off” if the expression hasn’t changed.  After you close and reopen the <strong>Replace in indicated region</strong> dialog, change the expression, do a <strong>Replace All</strong> or select <strong>Clear History</strong> from the drop-down menu beside <strong>Replace All</strong>, counting will start again from 1.</p>
<p dir="auto">The expression you want is <strong><code>(?=match+29)</code></strong>. (Since match will start from one, add 29 to match to start from 30.)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/103417</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/103417</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Mon, 06 Oct 2025 16:12:28 GMT</pubDate></item><item><title><![CDATA[Reply to Help REPLACING content with incremental order (by +1) on Mon, 06 Oct 2025 07:44:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/27184">@Coises</a><br />
<em>UPDATE FROM MY PREVIOUS MESSAGE</em></p>
<p dir="auto">Hi.<br />
using your method I managed to work out how to do it PARTIALLY using this.</p>
<p dir="auto">Find what: SnapRestSeconds = \d+<br />
Replace with: SnapRestSeconds = (?=match)<br />
Search mode: Regular expression</p>
<p dir="auto">This starts them at number at ‘2’ I need it to start at 30 please, can you help?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/103410</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/103410</guid><dc:creator><![CDATA[samsung s6 Lite]]></dc:creator><pubDate>Mon, 06 Oct 2025 07:44:59 GMT</pubDate></item><item><title><![CDATA[Reply to Help REPLACING content with incremental order (by +1) on Mon, 06 Oct 2025 06:52:35 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/27184">@Coises</a><br />
Hi.<br />
I have a similar issue but i need different help<br />
I have these lines throughout my file, occurring between 300 to 400 times,</p>
<p dir="auto">SnapRestSeconds = 76<br />
SnapRestSeconds = 120</p>
<p dir="auto">I would like to have the numbers replaced so its incremental and starting at number 30.<br />
I can remove the numbers and replace them if necessary.</p>
<p dir="auto">Is it possible to do this?<br />
Any help would be appreciated.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/103409</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/103409</guid><dc:creator><![CDATA[samsung s6 Lite]]></dc:creator><pubDate>Mon, 06 Oct 2025 06:52:35 GMT</pubDate></item><item><title><![CDATA[Reply to Help REPLACING content with incremental order (by +1) on Fri, 05 Jan 2024 08:53:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/27184">@Coises</a></p>
<p dir="auto">WOW! Thank you so much!!!<br />
It worked beautifully!</p>
<p dir="auto">btw, I didn´t know your plugin so far. Thank you for sharing it for the public.</p>
<p dir="auto">best regards</p>
<p dir="auto">JR</p>
]]></description><link>https://community.notepad-plus-plus.org/post/91711</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/91711</guid><dc:creator><![CDATA[Joel Rodrigues]]></dc:creator><pubDate>Fri, 05 Jan 2024 08:53:00 GMT</pubDate></item><item><title><![CDATA[Reply to Help REPLACING content with incremental order (by +1) on Fri, 05 Jan 2024 07:32:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29997">@Joel-Rodrigues</a> said in <a href="/post/91705">Help REPLACING content with incremental order (by +1)</a>:</p>
<blockquote>
<p dir="auto">The lines with “HandleID” content are not in sequence. They are as follows:</p>
<pre><code>"HandleId": "1",
(some text here)
(some text here)
"HandleId": "13",
(some text here)
(some text here)
(some text here)
(some text here)
"HandleId": "5",
"HandleId": "2",
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
"HandleId": "11",
(some text here)
</code></pre>
<p dir="auto">My intention would to be presented as follows:</p>
<pre><code>"HandleId": "1",
(some text here)
(some text here)
"HandleId": "2",
(some text here)
(some text here)
(some text here)
(some text here)
"HandleId": "3",
"HandleId": "4",
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
"HandleId": "5",
(some text here)
</code></pre>
</blockquote>
<p dir="auto">In that case, there are a few options.</p>
<p dir="auto">The easiest, in my opinion, would be to use the Columns++ plugin. (However, I wrote that plugin, so perhaps I am biased.):</p>
<p dir="auto">Columns++ isn’t yet in the Plugins Admin for Notepad++; so you’ll need to install it either using the Quick Installer link listed for the <a href="https://github.com/Coises/ColumnsPlusPlus/releases/latest/" rel="nofollow ugc">latest version</a>, or, if you can’t or don’t want to use that, following the instructions <a href="https://github.com/Coises/ColumnsPlusPlus#installation" rel="nofollow ugc">here</a>.</p>
<p dir="auto">After installing Columns++, open your file in Notepad++.</p>
<p dir="auto">Select <strong>Plugins</strong> | <strong>Columns++</strong> | <strong>Search…</strong>, enter:</p>
<p dir="auto"><strong>Find what : <code>"HandleId":\h*"\d+"</code></strong><br />
<strong>Replace with : <code>"HandleId": "(?=match)"</code></strong><br />
<strong>Search Mode: Regular expression</strong></p>
<p dir="auto">and click <strong>Replace All</strong>.</p>
<p dir="auto">The MultiReplace plugin, which can be installed from Plugins Admin, can do this in a way similar to Columns++, though the details are different.</p>
<p dir="auto">If you do not want to install a plugin, your problem can be solved with only Notepad++ built-in functions, using a method similar to what I described in my previous post:</p>
<ul>
<li>
<p dir="auto">First insert an increasing number at the beginning of every line in the file. For this, be sure to set <strong>Leading: Zeros</strong> in the <strong>Column Editor</strong> dialog so they are all the same width.</p>
</li>
<li>
<p dir="auto">Then make a rectangular selection of the parts after the added line numbers and sort on that — that will put all the lines beginning with HandleId together.</p>
</li>
<li>
<p dir="auto">Then replace the numbers on the (now contiguous) HandleId lines the same way I described in my previous post.</p>
</li>
<li>
<p dir="auto">Then sort the file with nothing selected, which will put the lines back in the original order.</p>
</li>
<li>
<p dir="auto">Then make a rectangular selection around the line numbers and delete them.</p>
</li>
</ul>
]]></description><link>https://community.notepad-plus-plus.org/post/91708</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/91708</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Fri, 05 Jan 2024 07:32:59 GMT</pubDate></item><item><title><![CDATA[Reply to Help REPLACING content with incremental order (by +1) on Fri, 05 Jan 2024 06:56:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi folks and thank you so much for your kind attention and support.</p>
<p dir="auto">Maybe as was highlighted, I should have provided more details.</p>
<p dir="auto">The lines with “HandleID” content are not in sequence. They are as follows:</p>
<pre><code>"HandleId": "1",
(some text here)
(some text here)
"HandleId": "13",
(some text here)
(some text here)
(some text here)
(some text here)
"HandleId": "5",
"HandleId": "2",
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
"HandleId": "11",
(some text here)
</code></pre>
<p dir="auto">My intention would to be presented as follows:</p>
<pre><code>"HandleId": "1",
(some text here)
(some text here)
"HandleId": "2",
(some text here)
(some text here)
(some text here)
(some text here)
"HandleId": "3",
"HandleId": "4",
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
(some text here)
"HandleId": "5",
(some text here)
</code></pre>
<p dir="auto">It´s not necessary to also move the “(some text here)” content together with the HandleID … I just need to change the HandleID number.</p>
<p dir="auto">Sorry for not providing this detail before.</p>
<p dir="auto">best regards</p>
<p dir="auto">JR</p>
]]></description><link>https://community.notepad-plus-plus.org/post/91705</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/91705</guid><dc:creator><![CDATA[Joel Rodrigues]]></dc:creator><pubDate>Fri, 05 Jan 2024 06:56:32 GMT</pubDate></item><item><title><![CDATA[Reply to Help REPLACING content with incremental order (by +1) on Thu, 04 Jan 2024 18:33:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29997">@Joel-Rodrigues</a> said in <a href="/post/91675">Help REPLACING content with incremental order (by +1)</a>:</p>
<blockquote>
<p dir="auto">Hi folks,</p>
<p dir="auto">In my TXT file I have several lines with the following content:</p>
<pre><code>"HandleId": "1",
"HandleId": "13",
"HandleId": "5",
"HandleId": "2",
"HandleId": "11",
</code></pre>
<p dir="auto">I would like to replace the number in a ascendent incremental order by +1, so the lines above would change to:</p>
<pre><code>"HandleId": "1",
"HandleId": "2",
"HandleId": "3",
"HandleId": "4",
"HandleId": "5",
</code></pre>
<p dir="auto">It seems easy, but imagine that I have thousands of lines in this context.</p>
</blockquote>
<p dir="auto">The simplest solution depends a lot on whether you’ve described the problem precisely or omitted some details. <em>If</em> all the lines are the same except for the number, and they are all together (nothing else intervening), you can do it this way:</p>
<p dir="auto">First, make a rectangular selection that encloses all the numbers and the quotes and commas following them. To do that, click between the number and the preceding quote on the first line; then scroll down using the scroll bar (don’t click in the document or use your keyboard) to the end of the lines you want to change, then hold down Shift and Alt on your keyboard and click on the last line somewhere well to the right of the longest line. You’ll see a selection that covers all the numbers and the closing <strong><code>",</code></strong> on each line, plus some extra empty space at the right. It doesn’t matter how much extra space you cover on the right, so long as you get past the end of every line in the selection.</p>
<p dir="auto">Now, type <strong><code>",</code></strong> which will leave you with a series of lines ending in <strong><code>"",</code></strong>.</p>
<p dir="auto">Now, make another rectangular selection starting between the two quote marks at the end of the first line and ending between the two quote marks at the end of the last line. This will have no width (so it will just look like a single, thin vertical line) and will extend across all the lines you are changing.</p>
<p dir="auto">Next, choose <strong>Edit</strong> | <strong>Column Editor</strong> from the main menu. Enter:<br />
<strong>Number to insert</strong> <em>(selected)</em><br />
<strong>Initial number: <code>1</code></strong><br />
<strong>Increase by: <code>1</code></strong><br />
<strong>Repeat: <code>1</code></strong><br />
<strong>Leading: None</strong><br />
<strong>Format: Dec</strong><br />
and click <strong>OK</strong>.</p>
<p dir="auto">You should now have what you want.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/91682</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/91682</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Thu, 04 Jan 2024 18:33:30 GMT</pubDate></item><item><title><![CDATA[Reply to Help REPLACING content with incremental order (by +1) on Thu, 04 Jan 2024 17:55:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29997">@Joel-Rodrigues</a> Something like this is better handled by a scripting language, but you can be a little cheeky with the Search Results Window and copy its output:</p>
<pre><code class="language-text">Search "HandleId" (5 hits in 1 file of 1 searched)
  new 1 (5 hits)
	Line 1: "HandleId": "1",
	Line 2: "HandleId": "13",
	Line 3: "HandleId": "5",
	Line 4: "HandleId": "2",
	Line 5: "HandleId": "11",
</code></pre>
<p dir="auto">Then use a RegEx search for “<code>: "HandleId":.*</code>” and replace with “<code>",</code>”:</p>
<pre><code class="language-text">Search "HandleId" (5 hits in 1 file of 1 searched)
  new 1 (5 hits)
	Line 1",
	Line 2",
	Line 3",
	Line 4",
	Line 5",
</code></pre>
<p dir="auto">And again RegEx search for “<code>^\s+Line\s+</code>” and replace with “<code>"HandleId": "</code>”:</p>
<pre><code class="language-text">Search "HandleId" (5 hits in 1 file of 1 searched)
  new 1 (5 hits)
"HandleId": "1",
"HandleId": "2",
"HandleId": "3",
"HandleId": "4",
"HandleId": "5",
</code></pre>
<p dir="auto">Then just delete the first two lines.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/91680</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/91680</guid><dc:creator><![CDATA[supasillyass]]></dc:creator><pubDate>Thu, 04 Jan 2024 17:55:39 GMT</pubDate></item><item><title><![CDATA[Reply to Help REPLACING content with incremental order (by +1) on Thu, 04 Jan 2024 14:51:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29997">@Joel-Rodrigues</a> said in <a href="/post/91675">Help REPLACING content with incremental order (by +1)</a>:</p>
<blockquote>
<p dir="auto">Could someone help me with this, please?</p>
</blockquote>
<p dir="auto">Our FAQ section has a whole writeup on mathematical replacement.  Go read that, and use one of the methods suggested there.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/91676</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/91676</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Thu, 04 Jan 2024 14:51:28 GMT</pubDate></item></channel></rss>