<?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[Replace text with incremented counter?]]></title><description><![CDATA[<p dir="auto">Newbie here - please be gentle!  :)</p>
<p dir="auto">I’m sure there must already be a way to do this, but I haven’t yet figured it out.  I’m trying to find a way to replace text with an incremented counter.  For example, if I have a file containing this:</p>
<p dir="auto">= = = = = = = = = =<br />
Lorem ipsum dolor sit amet, 9999, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud 9999, exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in 9999, voluptate<br />
= = = = = = = = = =</p>
<p dir="auto">I’d like to replace the first occurrence of “9999” with “1”, the second occurrence of “9999” with “2”, etc., resulting in:</p>
<p dir="auto">= = = = = = = = = =<br />
Lorem ipsum dolor sit amet, 1, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud 2, exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in 3, voluptate<br />
= = = = = = = = = =</p>
<p dir="auto">I don’t see any way to do this through regular expressions.  I’m guessing it might be possible with TextFX, but I’m apparently too stupid to figure out how.  Is there a way to do this with Notepad++?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/12301/replace-text-with-incremented-counter</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 14:58:25 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/12301.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 31 Aug 2016 19:03:16 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Replace text with incremented counter? on Mon, 18 May 2020 19:22:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/rupert-russell" aria-label="Profile: Rupert-Russell">@<bdi>Rupert-Russell</bdi></a></p>
<p dir="auto">Starting to wonder if this isn’t spam for TextPad as you posted virtually the same thing in <a href="https://community.notepad-plus-plus.org/topic/19414/replace-text-with-incremented-counter">THIS THREAD</a> that has an extremely similar title.</p>
<p dir="auto">If it is NOT spam, then what is the point of posting it here?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/54026</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/54026</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 18 May 2020 19:22:24 GMT</pubDate></item><item><title><![CDATA[Reply to Replace text with incremented counter? on Mon, 18 May 2020 18:51:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beerslayer" aria-label="Profile: beerslayer">@<bdi>beerslayer</bdi></a> You can do this using a Regular Expression but not in Notepad++<br />
TextPad has a built in function that uses /i  for increment<br />
<a href="https://textpad.com/download/index.html" rel="nofollow ugc">https://textpad.com/download/index.html</a></p>
<p dir="auto">Find: ^\r\n(.*\r\n)<br />
Replace:  \r\n\i $1</p>
<p dir="auto"><img src="http://rupert.id.au/tutorials/regularexpressions/images/add-question-numbers-3.png" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.notepad-plus-plus.org/post/54016</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/54016</guid><dc:creator><![CDATA[Rupert Russell]]></dc:creator><pubDate>Mon, 18 May 2020 18:51:12 GMT</pubDate></item><item><title><![CDATA[Reply to Replace text with incremented counter? on Wed, 21 Sep 2016 19:41:55 GMT]]></title><description><![CDATA[<p dir="auto">I use note pad for script proseccing so im just assuming that 9999 has fixed position in all lines,this is typical case of mine, if this is not the case then just ignore my initative to be helpful. you dont have to be rude…</p>
]]></description><link>https://community.notepad-plus-plus.org/post/17987</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17987</guid><dc:creator><![CDATA[Rami Kazziha]]></dc:creator><pubDate>Wed, 21 Sep 2016 19:41:55 GMT</pubDate></item><item><title><![CDATA[Reply to Replace text with incremented counter? on Wed, 21 Sep 2016 13:53:30 GMT]]></title><description><![CDATA[<p dir="auto">I don’t think “typing from your mobile” excuses you from typos, inaccuracies, or whatever it is you think it excuses you from…if you are going to post, you bear the responsibility for correcting (most…[nobody is perfect!]) typos before submitting, or you won’t be taken seriously here.  Typos aside, you also should have a quality answer, if your post is providing a solution to a question, and you do not have that either, sorry.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/17982</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17982</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Wed, 21 Sep 2016 13:53:30 GMT</pubDate></item><item><title><![CDATA[Reply to Replace text with incremented counter? on Wed, 21 Sep 2016 13:36:28 GMT]]></title><description><![CDATA[<p dir="auto">Im typing from mobilr so excuse my typod if any…<br />
Mark the column you want to replcae with block sekection -mouse and alt - then menues! Edit! Column editor…<br />
You can figure it out from there</p>
]]></description><link>https://community.notepad-plus-plus.org/post/17981</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17981</guid><dc:creator><![CDATA[Rami Kazziha]]></dc:creator><pubDate>Wed, 21 Sep 2016 13:36:28 GMT</pubDate></item><item><title><![CDATA[Reply to Replace text with incremented counter? on Tue, 06 Sep 2016 21:03:42 GMT]]></title><description><![CDATA[<p dir="auto">Hello <strong>beerslayer</strong>, <strong>Jim</strong> and <strong>Vasile Caraus</strong>,</p>
<p dir="auto"><strong>Jim</strong>, many thanks for your judgement about my work on <strong>regexes</strong> ! But, unfortunately, as you said, this kind of replacement needs a <strong>script</strong> or <strong>programming</strong> language !</p>
<p dir="auto">In addition, to the <strong>Vasile Caraus</strong>’s solution, I (re-) found out a post of <strong>Dave Brotherstone</strong> ( the author of the excellent <strong>N++ Python script</strong> ), on <strong><a href="http://SourceForge.net" rel="nofollow ugc">SourceForge.net</a></strong>, related to that topic. So, <strong>beerslayer</strong>, just refers to the link below :</p>
<p dir="auto"><a href="https://sourceforge.net/p/npppythonscript/discussion/1199074/thread/8d2ed95a/?limit=25#628b" rel="nofollow ugc">https://sourceforge.net/p/npppythonscript/discussion/1199074/thread/8d2ed95a/?limit=25#628b</a></p>
<p dir="auto">Have also a look to a <strong>Claudia Franck</strong>’s solution, on our site :</p>
<p dir="auto"><a href="https://notepad-plus-plus.org/community/topic/11635/how-to-replace-a-number-range-with-same-rang-just-adding-an-offset-ie-find-a-3-digit-number-between-say-133-to-183-add-64-and-replace-the-original-number/2" rel="nofollow ugc">https://notepad-plus-plus.org/community/topic/11635/how-to-replace-a-number-range-with-same-rang-just-adding-an-offset-ie-find-a-3-digit-number-between-say-133-to-183-add-64-and-replace-the-original-number/2</a></p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/17721</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17721</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 06 Sep 2016 21:03:42 GMT</pubDate></item><item><title><![CDATA[Reply to Replace text with incremented counter? on Mon, 05 Sep 2016 14:25:26 GMT]]></title><description><![CDATA[<p dir="auto">PHP.</p>
<p dir="auto">One of my friends make a script for me, with increment and replace.  Put this php file from the .zip in localhost (with the files that you want to change).  Change “wxyz” with the word you want to make the increment. Then run the replace+increment.php</p>
<p dir="auto">All your files will be change in a second with increment.</p>
<p dir="auto">It is easy.</p>
<p dir="auto"><a href="http://www.mediafire.com/download/fpcmqerrn0eccvz/replace+increment.zip" rel="nofollow ugc">http://www.mediafire.com/download/fpcmqerrn0eccvz/replace+increment.zip</a></p>
]]></description><link>https://community.notepad-plus-plus.org/post/17697</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17697</guid><dc:creator><![CDATA[Vasile Caraus]]></dc:creator><pubDate>Mon, 05 Sep 2016 14:25:26 GMT</pubDate></item><item><title><![CDATA[Reply to Replace text with incremented counter? on Thu, 01 Sep 2016 12:05:46 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/beerslayer" aria-label="Profile: beerslayer">@<bdi>beerslayer</bdi></a></p>
<p dir="auto">I don’t think you can do it with regular expressions, but <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> has done some amazing things with them, so it might be possible.</p>
<p dir="auto">You can do this easily using some scripting language like AWK, PERL, or Python.</p>
<p dir="auto">If you (and by you I mean anyone reading this) are a coder, or if you often work with and have to manipulate text files, you really should take the time to get familiar with some scripting language–it will save you loads of time in the long run.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/17628</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/17628</guid><dc:creator><![CDATA[Jim Dailey]]></dc:creator><pubDate>Thu, 01 Sep 2016 12:05:46 GMT</pubDate></item></channel></rss>