<?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[I want to remove certain range. Please help me]]></title><description><![CDATA[<p dir="auto">Hi Everyone!</p>
<p dir="auto">I want to remove certain range.</p>
<p dir="auto">I have a lot of files.</p>
<p dir="auto">The examples are below.</p>
<p dir="auto">Line 146 of tommy.html: &lt;td width=“150” id=“content_1” style=“background-color:#F0FCFF;”&gt;123456-7890123&lt;/td&gt;<br />
Line 146 of jimmy.html: &lt;td width=“150” id=“content_1” style=“background-color:#F0FCFF;”&gt;163456-7875865&lt;/td&gt;<br />
Line 146 of michael.html: &lt;td width=“150” id=“content_1” style=“background-color:#F0FCFF;”&gt;164689-8965698&lt;/td&gt;<br />
Line 146 of kimberly.html: &lt;td width=“150” id=“content_1” style=“background-color:#F0FCFF;”&gt;748956-8971457&lt;/td&gt;<br />
.<br />
.<br />
.<br />
.<br />
.</p>
<p dir="auto">So I want to change 13 digit numbers to 7 digit numbers.</p>
<p dir="auto">Line 146 of tommy.html: &lt;td width=“150” id=“content_1” style=“background-color:#F0FCFF;”&gt;123456-7******&lt;/td&gt;<br />
Line 146 of jimmy.html: &lt;td width=“150” id=“content_1” style=“background-color:#F0FCFF;”&gt;163456-7******&lt;/td&gt;<br />
Line 146 of michael.html: &lt;td width=“150” id=“content_1” style=“background-color:#F0FCFF;”&gt;164689-8******&lt;/td&gt;<br />
Line 146 of kimberly.html: &lt;td width=“150” id=“content_1” style=“background-color:#F0FCFF;”&gt;748956-8******&lt;/td&gt;<br />
.<br />
.<br />
.<br />
.<br />
.</p>
<p dir="auto">Have a good day!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/15785/i-want-to-remove-certain-range-please-help-me</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Apr 2026 18:40:31 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/15785.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 May 2018 12:04:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to I want to remove certain range. Please help me on Mon, 21 May 2018 12:33:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a></p>
<p dir="auto">HAha…I tested with <code>{2}</code> in place of <code>{145}</code>…much less work to create test data that way…I just changed it to 145 for posting!</p>
<h3>:-D</h3>
<p dir="auto">Of course, if we could ever get the <code>\A</code> to work…  :-(</p>
]]></description><link>https://community.notepad-plus-plus.org/post/32372</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/32372</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Mon, 21 May 2018 12:33:14 GMT</pubDate></item><item><title><![CDATA[Reply to I want to remove certain range. Please help me on Mon, 21 May 2018 12:27:26 GMT]]></title><description><![CDATA[<p dir="auto">Hello, Hi, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12095">@johnnychangprogrammer</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/374">@scott-sumner</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@claudia-frank</a> and <strong>All</strong>,</p>
<p dir="auto">Ah, <strong>Scott</strong>, very <strong>clever</strong>, indeed ! My <strong>fault</strong> was to test my regexes, against a <strong><code>200</code></strong> lines text  which doesn’t allow a <strong>second</strong> match, anyway :-((</p>
<p dir="auto">So, obviously, my regexes are not <strong>reliable</strong>, in <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12095">@johnnychangprogrammer</a>’s case, and the <strong>Scott</strong> regex S/R is the <strong>unique correct</strong> solution !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/32371</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/32371</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 21 May 2018 12:27:26 GMT</pubDate></item><item><title><![CDATA[Reply to I want to remove certain range. Please help me on Mon, 21 May 2018 12:09:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a> said:</p>
<blockquote>
<p dir="auto">the remaining of file, after line 146, must be preserved, the best way to do is to ignore all that part</p>
</blockquote>
<p dir="auto">Hi Guy,</p>
<p dir="auto">The reason I used <code>.*</code> near the end of my regex was to protect against the possible case where the file is a lot longer than 146 lines and has matches farther on down in the file.  Remember that when N++ finds/replaces a match, it starts looking again at the character position following the match/replacement–for more matches.  Your first SEARCH suggestion fails in that regard–meaning that matches past line 146 will be changed, and this didn’t seem to be what the OP wanted.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/32369</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/32369</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Mon, 21 May 2018 12:09:54 GMT</pubDate></item><item><title><![CDATA[Reply to I want to remove certain range. Please help me on Mon, 21 May 2018 13:05:24 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12095">@johnnychangprogrammer</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/374">@scott-sumner</a>, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@claudia-frank</a> and <strong>All</strong>,</p>
<p dir="auto"><strong>UPDATE :</strong></p>
<p dir="auto">Do <strong>not</strong> trust in the <strong>two</strong> regex S/R, related in <strong>this</strong> post and refer to my <strong>second</strong> post, and to <strong>Scott</strong> explanations,  below !</p>
<hr />
<p dir="auto"><strong>Scott</strong>, I think that we can, also, use the <strong>shortened</strong> regex S/R, below :</p>
<p dir="auto">SEARCH <strong><code>(?-s)((?:^.*\R){145}.*?-\d)\d{6}</code></strong></p>
<p dir="auto">REPLACE <strong><code>\1******</code></strong></p>
<p dir="auto">Because, as the <strong>remaining</strong> of file, after line <strong><code>146</code></strong>, must be <strong>preserved</strong>, the best way to do is to <strong>ignore all</strong> that part, isn’t it ?</p>
<hr />
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12095">@johnnychangprogrammer</a>, as you will use the <strong><code>Find in Files </code></strong> dialog, which <strong>scan</strong> every file from <strong>beginning</strong> to <strong>end</strong>, performing a <strong>Replace All</strong> operation, you could, as well, use the <strong>third</strong> version, below :</p>
<p dir="auto">SEARCH <strong><code>(?-s)(?:^.*\R){145}.*?-\d\K\d{6}</code></strong></p>
<p dir="auto">REPLACE <strong><code>******</code></strong></p>
<p dir="auto">In case, you would use the <strong><code>Replace</code></strong> dialog, instead, with that <strong>third</strong> version, you should :</p>
<ul>
<li>
<p dir="auto">Tick the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto">Click, <strong>exclusively</strong>, on the <strong><code>Replace All </code></strong> button ( <strong>not</strong> the step by step <strong>Replace</strong> button )</p>
</li>
</ul>
<p dir="auto">Cheers,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/32367</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/32367</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 21 May 2018 13:05:24 GMT</pubDate></item><item><title><![CDATA[Reply to I want to remove certain range. Please help me on Mon, 21 May 2018 00:55:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12095">@Johnnychangprogrammer</a></p>
<p dir="auto">Ah, I missed the “line 146” requirement the first time around…I thought it was part of the data, I suppose!</p>
<p dir="auto">Maybe this:</p>
<p dir="auto"><strong>FInd what</strong> zone: <code>(?-s)((?:^.*\R){145}.*?-\d)\d{6}(?s)(&lt;/td&gt;$.*)</code><br />
<strong>Replace with</strong> zone: <code>\1******\2</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/32361</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/32361</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Mon, 21 May 2018 00:55:18 GMT</pubDate></item><item><title><![CDATA[Reply to I want to remove certain range. Please help me on Sun, 20 May 2018 22:41:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/374">@Scott-Sumner</a></p>
<p dir="auto">Thanks. That’s great !</p>
<p dir="auto">But other lines are also replaced.</p>
<p dir="auto">I want to change the exact lines.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/32357</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/32357</guid><dc:creator><![CDATA[Johnnychangprogrammer]]></dc:creator><pubDate>Sun, 20 May 2018 22:41:11 GMT</pubDate></item><item><title><![CDATA[Reply to I want to remove certain range. Please help me on Sun, 20 May 2018 22:38:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/3662">@Claudia-Frank</a></p>
<p dir="auto">Yes. It is always in line 146 each of the files.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/32356</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/32356</guid><dc:creator><![CDATA[Johnnychangprogrammer]]></dc:creator><pubDate>Sun, 20 May 2018 22:38:50 GMT</pubDate></item><item><title><![CDATA[Reply to I want to remove certain range. Please help me on Fri, 18 May 2018 12:23:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12095">@Johnnychangprogrammer</a></p>
<p dir="auto">One way might be:</p>
<p dir="auto"><strong>Find what</strong> zone: <code>(?&lt;=\d{6}-\d)\d{6}(?=&lt;/td&gt;$)</code><br />
<strong>Replace with</strong> zone: <code>******</code><br />
<strong>Search mode:</strong> Regular expression</p>
]]></description><link>https://community.notepad-plus-plus.org/post/32326</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/32326</guid><dc:creator><![CDATA[Scott Sumner]]></dc:creator><pubDate>Fri, 18 May 2018 12:23:07 GMT</pubDate></item><item><title><![CDATA[Reply to I want to remove certain range. Please help me on Fri, 18 May 2018 12:21:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/12095">@Johnnychangprogrammer</a></p>
<p dir="auto">Some questions to clarify the real data.<br />
Is it always line 146? In each of the files?<br />
Is always <code>&lt;td width=“150” id=“content_1” style=“background-color:#F0FCFF;”&gt;</code> in front of the 13 digit number?<br />
You wrote you want to have 7 digits but your example shows 7 digits <strong>and</strong> 6 times asteriks.<br />
Which version do you want to have?</p>
<p dir="auto">If the layout is not consistent, is the 13 digit number unique?</p>
<p dir="auto">Cheers<br />
Claudia</p>
]]></description><link>https://community.notepad-plus-plus.org/post/32325</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/32325</guid><dc:creator><![CDATA[Claudia Frank]]></dc:creator><pubDate>Fri, 18 May 2018 12:21:39 GMT</pubDate></item></channel></rss>