<?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[Slick way to remove line numbers from text]]></title><description><![CDATA[<p dir="auto">Perhaps you already have a way to do this, but I thought I’d share.</p>
<p dir="auto">If you need to remove line numbers from program code or whatever, a slick and fast free utility is online at:</p>
<p dir="auto"><a href="http://remove-line-numbers.ruurtjan.com/" rel="nofollow ugc">http://remove-line-numbers.ruurtjan.com/</a></p>
<p dir="auto">Go there, paste your code and it strips all line numbers quickly and reliably.</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/15203/slick-way-to-remove-line-numbers-from-text</link><generator>RSS for Node</generator><lastBuildDate>Thu, 15 Oct 2026 16:45:48 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/15203.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Feb 2018 04:22:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Slick way to remove line numbers from text on Sun, 04 Feb 2018 15:24:36 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/kent-hartland" aria-label="Profile: kent-hartland">@<bdi>kent-hartland</bdi></a>,</p>
<p dir="auto">Thanks for sharing this <strong>easy</strong> utility !</p>
<p dir="auto">However, you can achieve it, quickly enough, using <strong>regular expressions</strong>, in search/replacement, within N++ ;-))</p>
<ul>
<li>
<p dir="auto">Open your file, in N++</p>
</li>
<li>
<p dir="auto">Eventually, do a <strong>normal</strong> selection of the lines to be <strong>processed</strong></p>
</li>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong>)</p>
</li>
<li>
<p dir="auto">Type in the regex <strong><code>^\h*\d+</code></strong> , in the <strong>Find what:</strong> zone</p>
</li>
<li>
<p dir="auto">Leave the <strong>Replace with:</strong> zone <strong><code>EMPTY</code></strong></p>
</li>
<li>
<p dir="auto">If you did a <strong>selection</strong>, tick the <strong><code>In selection</code></strong> option. Otherwise, tick the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode ( IMPORTANT )</p>
</li>
<li>
<p dir="auto">Click on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
<p dir="auto">Et voilà !</p>
<hr />
<p dir="auto">Note that this regex is, simply, an <strong>approximation</strong> of what that small <strong>utility</strong> does ! Indeed, this program :</p>
<ul>
<li>
<p dir="auto">Considers, <strong>only</strong>, the usual <strong>latin digits</strong> ( with Unicode value, from <strong><code>\x{0030}</code></strong> to <strong><code>\x{0039}</code></strong> ) as numbers to be <strong>deleted</strong>, instead of all <strong>Unicode</strong> numbers or similar, of any <strong>language</strong> !</p>
</li>
<li>
<p dir="auto">Considers the first <strong>dot</strong> character ( <strong><code>.</code></strong> ), located <strong>right after</strong> a number, as a character to be <strong>deleted</strong>, too !</p>
</li>
<li>
<p dir="auto">Considers all possible Unicode <strong>White space</strong> character ( except for the <strong>New Line</strong> character, <strong><code>\x{0085}</code></strong> ) , between the <strong>End of Line</strong> characters of the <strong>previous</strong> line and the <strong>numbers</strong>, of the <strong>current</strong> one, as characters which have to be <strong>deleted</strong> , as well. Refer, for that topic, to :</p>
</li>
</ul>
<p dir="auto"><a href="http://www.unicode.org/Public/UCD/latest/ucd/PropList.txt" rel="nofollow ugc">http://www.unicode.org/Public/UCD/latest/ucd/PropList.txt</a></p>
<hr />
<p dir="auto">So, assuming you would add a <strong>line-break</strong>, at the <strong>very beginning</strong> of your file, an <strong>exact</strong> search regex could be :</p>
<p dir="auto"><strong><code>(\r\n|\r|\n)\K[^\S\x85]*[0-9]+\.?</code></strong></p>
<p dir="auto">Just for information, this regex :</p>
<ul>
<li>
<p dir="auto">First, the part <strong><code>(\r\n|\r|\n)</code></strong> tries to match some <strong>End of line</strong> character(s)</p>
</li>
<li>
<p dir="auto">Then, the <strong><code>\K</code></strong> syntax <strong>reset</strong> the regex engine search <strong>process</strong> and <strong>position</strong></p>
</li>
<li>
<p dir="auto">Now, the part <strong><code>[^\S\x85]*</code></strong> finds the <strong>longest</strong> sequence, possibly <strong>empty</strong>, of <strong>White Space</strong> characters, <strong>different</strong> of <strong><code>\x{0085} </code></strong></p>
</li>
<li>
<p dir="auto">After, the part <strong><code>[0-9]+</code></strong> simply looks for the <strong>longest non-empty</strong> range of classical <strong>digits</strong></p>
</li>
<li>
<p dir="auto">Finally, the syntax <strong><code>\.?</code></strong> searches a possible <strong>literal</strong> dot</p>
</li>
</ul>
<hr />
<p dir="auto"><strong>Remark</strong> :</p>
<p dir="auto">The part <strong><code>[^\S\x85]</code></strong> is <strong>difficult</strong> enough to understand : this <strong>negative</strong> class of characters <strong><code>[^...]</code></strong> represents a <strong>single</strong> character, which is <strong>DIFFERENT</strong> from, BOTH :</p>
<ul>
<li>
<p dir="auto">Any Unicode <strong>NON-Space</strong> character ( <strong><code>\S</code></strong> )</p>
</li>
<li>
<p dir="auto">The <strong>New Line</strong> character ( <strong><code>\x{0085}</code></strong> )</p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/29991</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/29991</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 04 Feb 2018 15:24:36 GMT</pubDate></item></channel></rss>