<?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[Sequence number 1, 2, 3... Change to adding a 0]]></title><description><![CDATA[<p dir="auto">Hi…</p>
<p dir="auto">I have a notepad++ document with my questions in this format:</p>
<p dir="auto">1-<br />
2-<br />
3-<br />
4-</p>
<p dir="auto">And I want now them to be:</p>
<p dir="auto">01-<br />
02-<br />
03-<br />
04-</p>
<p dir="auto">The problem is there are not consecutive in the document… I mean…</p>
<p dir="auto">1- How are you?</p>
<p dir="auto">A) Fine<br />
B) Fine<br />
C) Fine<br />
D) Fine</p>
<p dir="auto">2- How old are you?</p>
<p dir="auto">A) 21<br />
B) 21<br />
C) 21<br />
D) 21</p>
<p dir="auto">So i want to know if there is a method to secuence them like 01, 02, 03… despite they are not one below the other.</p>
<p dir="auto">There are 325 questions.</p>
<p dir="auto">Thanks.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25073/sequence-number-1-2-3-change-to-adding-a-0</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 14:10:02 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25073.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 27 Oct 2023 09:10:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Sequence number 1, 2, 3... Change to adding a 0 on Fri, 27 Oct 2023 16:29:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29589">@Un-Known</a></p>
<p dir="auto">Your title and example suggests that the question numbers are already correct, you just want to add a zero before them, and you say you have 325 questions; so I wonder, do you want:</p>
<pre><code>01-
02-
...
09-
010-
011-
...
099-
0100-
0101-
...
0325-
</code></pre>
<p dir="auto">which is what your question, taken precisely, says? Or:</p>
<pre><code>001-
002-
...
009-
010-
011-
...
099-
100-
101-
...
325-
</code></pre>
<p dir="auto">which is what I think <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a> assumed you meant?</p>
<p dir="auto">Also, are the numbers themselves already correct (just missing the leading zeros), or do you need to renumber, too?</p>
<p dir="auto">If all you wanted was to add one zero before every question number, and the pattern follows your example that all question lines, and only question lines, start with a number, then all you need is:</p>
<p dir="auto">From the menu, select <strong>Search</strong> | <strong>Replace</strong>; in the dialog, set:</p>
<p dir="auto"><strong>Find what : <code>^(\d)</code></strong><br />
<strong>Replace with: <code>0$1</code></strong><br />
<strong>Search Mode : Regular expression</strong></p>
<p dir="auto">and use the <strong>Replace All</strong> button.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90143</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90143</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Fri, 27 Oct 2023 16:29:38 GMT</pubDate></item><item><title><![CDATA[Reply to Sequence number 1, 2, 3... Change to adding a 0 on Fri, 27 Oct 2023 16:00:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3841">@PeterJones</a></p>
<p dir="auto">Thnak you and thanks too for the FAQ`s!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/90141</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90141</guid><dc:creator><![CDATA[Un Known]]></dc:creator><pubDate>Fri, 27 Oct 2023 16:00:34 GMT</pubDate></item><item><title><![CDATA[Reply to Sequence number 1, 2, 3... Change to adding a 0 on Fri, 27 Oct 2023 13:06:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/29589">@Un-Known</a> ,</p>
<p dir="auto">In one step, with just Notepad++?  No.  Notepad++ cannot natively handle mathematical replacements, as explained in <a href="https://community.notepad-plus-plus.org/topic/23170/faq-desk-can-i-do-a-mathematical-replacement">this FAQ</a> (which contains some of the workarounds mentioned below).</p>
<p dir="auto">If you allow for more than one step, or if you are willing to install a plugin, then yes.</p>
<p dir="auto">Until recently, I would have recommended a multi-step process, similar to:</p>
<ol>
<li>replace all newlines that don’t come before #- with a different character that you don’t use in your document, like a smiley face (<code>\R(?!\d+-)</code> ⇒ <code>☺</code>)</li>
<li>delete all the numbers before the - at the beginning of each combined line (<code>^\d+(?=-)</code> ⇒ <em>empty</em>)</li>
<li>Use a column selection then Column Editor (<strong>Edit &gt; Column Editor</strong> or <code>Alt+C</code>) to insert numbers starting at 1 <em>with leading zeroes</em></li>
<li>change the different-character back into newline sequence (<code>☺</code> ⇒ <code>\r\n</code> for Windows EOL)</li>
</ol>
<p dir="auto">But now that there are a couple of plugins that more easily handle mathy replacements, I’d suggest using one of those.</p>
<p dir="auto">For the <a href="/post/90044">Columns++ plugin</a>, I am pretty sure that something like the following (derived from <a href="/topic/23170/faq-desk-can-i-do-a-mathematical-replacement/3#:~:text=multiple%20of%2010-,ADD%20HARD%20LINE%20NUMBERS%20TO%20THE%20CURRENT%20FILE,-Find%20what%20%3A" title="ADD HARD LINE NUMBERS TO THE CURRENT FILE">this FAQ section</a> would work with Columns++ (and the author <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/27184">@Coises</a> will correct me if I’m wrong):</p>
<ul>
<li>Using the plugin’s search/replace (not Notepad++ search/replace)<br />
FIND = <code>^\d+-</code><br />
REPLACE = <code>(?=3:match)-</code>
<ul>
<li>where the <code>3</code> in that replacement means it will be three digits (001 - 325)</li>
<li>and the <code>match</code> in that replacement means</li>
</ul>
</li>
</ul>
<p dir="auto">And in the <a href="/post/90045">MultiReplace plugin</a>, I <em>think</em> you would need to use the <code>CNT</code> variable in its search/replace feature.</p>
<p dir="auto">----</p>
<p dir="auto"><em><strong>Please note</strong>: This Community Forum is not a data transformation service; you should not expect to be able to always say “I have data like X and want it to look like Y” and have us do all the work for you.  If you are new to the Forum, and new to regular expressions, we will often give help on the first one or two data-transformation questions, especially if they are well-asked and you show a willingness to learn; and we will point you to the documentation where you can learn how to do the data transformations for yourself in the future.  But if you repeatedly ask us to do your work for you, you will find that the patience of usually-helpful Community members wears thin.  The best way to learn regular expressions is by experimenting with them yourself, and getting a feel for how they work; having us spoon-feed you the answers without you putting in the effort doesn’t help you in the long term and is uninteresting and annoying for us.</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/90136</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/90136</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Fri, 27 Oct 2023 13:06:52 GMT</pubDate></item></channel></rss>