<?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[Add Increment Number (part 2)]]></title><description><![CDATA[<p dir="auto">So, I have this:</p>
<p dir="auto">bebe-55<br />
bebe-55<br />
bebe-55</p>
<p dir="auto">I made a regex so to add number 1-3, before each line:</p>
<p dir="auto">1-bebe-55<br />
2-bebe-55<br />
3-bebe-55</p>
<p dir="auto"><strong>Solution very good, but…:</strong></p>
<p dir="auto">FIND: <code>\A(bebe-55)(?:\R\1){2}\z</code><br />
REPLACE: <code>1-\1\n2-\1\n3-\1</code></p>
<p dir="auto">Or this:</p>
<p dir="auto">FIND: <code>\A(.*)\R(.*)\R(.*)\R?\Z</code><br />
REPLACE: <code>1-$1\r\n2-$2\r\n3-$3</code></p>
<p dir="auto"><strong>But if I have 2000 lines, the replace should contain several hundred pages. I need another idea.</strong></p>
<p dir="auto">My only problem is that the Replace expression is too long. I want a shorter replace.</p>
<p dir="auto">I also try this shorter:</p>
<p dir="auto">FIND: <code>^(bebe-55)$</code><br />
REPLACE: <code>1-\1(?{1}\2)$2</code></p>
<p dir="auto">But this doesn’t work.</p>
<p dir="auto">I need a shorter incremental regex, not column editor</p>
<p dir="auto">Also I</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/27645/add-increment-number-part-2</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 19:43:44 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/27645.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 30 Aug 2026 15:34:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Add Increment Number (part 2) on Sun, 30 Aug 2026 18:50:10 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> <a href="/post/106213">said</a>:</p>
<blockquote>
<p dir="auto">PeterJones <a href="/post/106209">said</a>:</p>
<p dir="auto">I assume the Search++ syntax would be the same</p>
</blockquote>
<p dir="auto">Per the <a href="https://community.notepad-plus-plus.org/post/105041">Search++ announcement</a>, it can do the numeric calculations that were first developed for Columns++.</p>
<p dir="auto">I should update the FAQ soon…</p>
</blockquote>
<p dir="auto">I recommend waiting on that update. Search++ is not “production ready” yet. People shouldn’t be using it at present unless they want to be beta testers. Once I reach a 1.0 release I’ll make a serious effort to avoid changing things that people would expect to stay the same, but right now, anything could be changed at any time.</p>
<p dir="auto">Numeric expressions in Search++ do not have quite all the features of numeric expressions in Columns++; in particular, the history options (using the values captured or computed in a previous match) aren’t supported in Search++, and the exprtk <strong>return</strong> statement isn’t supported.</p>
<p dir="auto">However, I think all the features directly <a href="https://community.notepad-plus-plus.org/post/90044">cited in the Math FAQ</a> are included. The <code>reg(1)</code> syntax still works, but in Search++ you can use <code>$1</code> as well. However, a quirk is that since Search++ doesn’t have the persistent <strong>Decimal separator is comma</strong> option of Columns++, it’s necessary to use <code>regc(1)</code> or <code>$$1</code> for European-style numbers with periods and/or commas.</p>
<p dir="auto">Finally, Columns++ can only work on the active document. Search++ has a <strong>Find in Files</strong> option, but <strong>Replace in Files</strong> has not yet been implemented. So if your guess was correct and <a class="plugin-mentions-user plugin-mentions-a" href="/user/neculai-i.-fantanaru" aria-label="Profile: neculai-i.-fantanaru">@<bdi>neculai-i.-fantanaru</bdi></a> wants a regular expression because it must be applied to many files at once, <a class="plugin-mentions-user plugin-mentions-a" href="/user/thomas-knoefel" aria-label="Profile: thomas-knoefel">@<bdi>thomas-knoefel</bdi></a>’s <a href="https://github.com/daddel80/notepadpp-multireplace/tree/main#multireplace-for-notepad" rel="nofollow ugc">MultiReplace</a> is the best choice among presently-existing options.</p>
<p dir="auto">Oh, and MultiReplace has recently <a href="https://community.notepad-plus-plus.org/post/105689">added an option to use exprtk formulas</a> as an alternative to its Lua syntax.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106214</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106214</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Sun, 30 Aug 2026 18:50:10 GMT</pubDate></item><item><title><![CDATA[Reply to Add Increment Number (part 2) on Sun, 30 Aug 2026 17:52:00 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto">PeterJones <a href="/post/106209">said</a>:</p>
<p dir="auto">I assume the Search++ syntax would be the same</p>
</blockquote>
<p dir="auto">Per the <a href="https://community.notepad-plus-plus.org/post/105041">Search++ announcement</a>, it can do the numeric calculations that were first developed for Columns++.</p>
<p dir="auto">I should update the FAQ soon…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106213</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106213</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sun, 30 Aug 2026 17:52:00 GMT</pubDate></item><item><title><![CDATA[Reply to Add Increment Number (part 2) on Sun, 30 Aug 2026 16:14:03 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/neculai-i.-fantanaru" aria-label="Profile: Neculai-i.-fantanaru">@<bdi>Neculai-i.-fantanaru</bdi></a> and All,</p>
<p dir="auto">For this purpose, you should study the <strong><code>Columns++</code></strong> documentation of <a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: coises">@<bdi>coises</bdi></a>, below :</p>
<p dir="auto"><a href="https://coises.github.io/ColumnsPlusPlus/help.htm#formulas" rel="nofollow ugc">https://coises.github.io/ColumnsPlusPlus/help.htm#formulas</a></p>
<p dir="auto">or with the <strong><code>MultiReplace</code></strong> plugin of <a class="plugin-mentions-user plugin-mentions-a" href="/user/thomas-knoefel" aria-label="Profile: thomas-knoefel">@<bdi>thomas-knoefel</bdi></a>, from these <strong>two</strong> links below :</p>
<p dir="auto"><a href="https://github.com/daddel80/notepadpp-multireplace/blob/main/FORMULA-SUPPORT.md#lua-reference" rel="nofollow ugc">https://github.com/daddel80/notepadpp-multireplace/blob/main/FORMULA-SUPPORT.md#lua-reference</a></p>
<p dir="auto"><a href="https://github.com/daddel80/notepadpp-multireplace/blob/main/FORMULA-SUPPORT.md#exprtk-reference" rel="nofollow ugc">https://github.com/daddel80/notepadpp-multireplace/blob/main/FORMULA-SUPPORT.md#exprtk-reference</a></p>
<p dir="auto">As you can see, it should be possible with some <strong>special</strong> regexes to achieve your goal !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106211</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106211</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 30 Aug 2026 16:14:03 GMT</pubDate></item><item><title><![CDATA[Reply to Add Increment Number (part 2) on Sun, 30 Aug 2026 16:00:17 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/neculai-i.-fantanaru" aria-label="Profile: Neculai-I.-Fantanaru">@<bdi>Neculai-I.-Fantanaru</bdi></a> <a href="/post/106208">said</a>:</p>
<p dir="auto">I need a regex, not column editor, not python.</p>
</blockquote>
<p dir="auto">If you have multiple files, it is understandable to exclude column editor, as that’s not practical.  But you are <em>choosing</em> to exclude PythonScript: there is a difference.  You have access to the plugin, and you know how to use it.  So you do not <em>need</em> a regex, you <em>want</em> a regex, which are two different things.</p>
<p dir="auto">Notepad++'s built-in regex doesn’t do auto-increment, and your previous topic with the edge cases just pointed that out to you (you ended up doing a weird duplicate and edge-case to get a pseudo-‘count’).  For this task, you would need to use a plugin – either PythonScript (which you are artificially rejecting), or one of the fancier search plugins that have enabled custom “numbering” syntax – like MultiReplace or Columns++ (or presumably Search++ – I assume <a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: Coises">@<bdi>Coises</bdi></a> included all the math extras when he ported the searching from Columns++ to Search++)</p>
<p dir="auto">The <a href="/topic/23170">Math FAQ</a> already explains how to do counting-like actions in PythonScript and in MultiReplace and in Columns++ (and I assume the Search++ syntax would be the same).  There is no reason for us to re-iterate what’s already in the FAQ.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106209</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106209</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Sun, 30 Aug 2026 16:00:17 GMT</pubDate></item><item><title><![CDATA[Reply to Add Increment Number (part 2) on Sun, 30 Aug 2026 15:38:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a> I need a regex, not column editor, not python.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106208</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106208</guid><dc:creator><![CDATA[Neculai I. Fantanaru]]></dc:creator><pubDate>Sun, 30 Aug 2026 15:38:25 GMT</pubDate></item><item><title><![CDATA[Reply to Add Increment Number (part 2) on Sun, 30 Aug 2026 15:37:16 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/neculai-i.-fantanaru" aria-label="Profile: Neculai-I.-Fantanaru">@<bdi>Neculai-I.-Fantanaru</bdi></a> <a href="/post/106206">said</a>:</p>
<p dir="auto">add number 1-16, before each line:</p>
<p dir="auto">1-bebe-55<br />
2-bebe-55<br />
3-bebe-55</p>
</blockquote>
<p dir="auto">Notepad++'s existing “Column Editor” can do this already.<br />
I believe the default keycombo is Alt+c (or you can find it on the Edit menu).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/106207</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/106207</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Sun, 30 Aug 2026 15:37:16 GMT</pubDate></item></channel></rss>