<?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[Need help with replacing&#x2F;editing lines!]]></title><description><![CDATA[<p dir="auto">Hello everyone, desperately need some help with replacing lines.<br />
My work requires me to occasionally use Notepad++, but only the simple “find &amp; replace” up till now, never the regex ones. So I am not sure whether it is possible to achieve what I intend to do. Anyway, here are my data:</p>
<p dir="auto"><img src="/assets/uploads/files/1643181697038-example.png" alt="example.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">There are two things I am hoping to do with it:</p>
<ol>
<li>
<p dir="auto">to change all the individual “0” into “0.000”. So the 2nd (and 18th, 22th, 24th, 25th etc.) line should become 0.000, but other lines should stay the same, like the 6th line should still be “0.006”.</p>
</li>
<li>
<p dir="auto">to replace all the lines contains “e-XX” to “0.000”.<br />
For example, the 3-5 line should all become “0.000”.<br />
Don’t know this would make things easier or not but: all these lines that contain “e-XX” have the same length (9 characters).</p>
</li>
</ol>
<p dir="auto">About my data file though, there are few hundred files like this one, and all have the same number of lines, around 193000.<br />
Here is a part of it:</p>
<p dir="auto">19760101<br />
0<br />
1.974e-05<br />
3.949e-06<br />
2.764e-05<br />
0.006<br />
0.001<br />
0.001<br />
0.000<br />
0.000<br />
0.000<br />
0.000<br />
0.001<br />
0.002<br />
0.001<br />
0.001<br />
0.000<br />
0<br />
0.011<br />
0.071<br />
0.002<br />
0<br />
9.969e-05<br />
0<br />
0<br />
0<br />
0<br />
0.000<br />
0<br />
0<br />
0<br />
0<br />
0.000<br />
0.003<br />
0.002<br />
0.002<br />
6.319e-05<br />
0<br />
0.000<br />
6.319e-05<br />
0.000<br />
0<br />
0<br />
0<br />
0</p>
<p dir="auto">Please help me out, thanks a TON!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/22437/need-help-with-replacing-editing-lines</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 00:08:31 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/22437.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Jan 2022 07:42:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Need help with replacing&#x2F;editing lines! on Thu, 27 Jan 2022 03:19:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/7377">@alan-kilborn</a> thank you it helps ;)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73372</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73372</guid><dc:creator><![CDATA[Moking C]]></dc:creator><pubDate>Thu, 27 Jan 2022 03:19:11 GMT</pubDate></item><item><title><![CDATA[Reply to Need help with replacing&#x2F;editing lines! on Wed, 26 Jan 2022 12:43:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a> said in <a href="/post/73325">Need help with replacing/editing lines!</a>:</p>
<blockquote>
<p dir="auto">Can’t say I 100% understood</p>
</blockquote>
<p dir="auto">I might say things differently from Guy – does it help any with understanding?:</p>
<ul>
<li>
<p dir="auto">Instead of <code>non-null text</code> I would say “one or more characters”.</p>
</li>
<li>
<p dir="auto">Instead of <code>Any regex . symbol refer to a single standard character ( Not EOL ones )</code> I would say “any <code>.</code> in the expression can match any character except line-ending characters (carriage return or linefeed)”</p>
</li>
<li>
<p dir="auto">Instead of <code>Any search is sensible to case : modifier -i ( not insensible ! )</code> I would say “<code>-i</code> means to not (from the minus) ignore (from the <code>i</code>) case of the characters, thus case (of the <code>e</code>) is relevant”</p>
</li>
</ul>
<p dir="auto">I don’t know if helps, but it is another way of saying these things.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73335</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73335</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 26 Jan 2022 12:43:09 GMT</pubDate></item><item><title><![CDATA[Reply to Need help with replacing&#x2F;editing lines! on Wed, 26 Jan 2022 08:21:03 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> Can’t say I 100% understood but thank you. Have a nice day :)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73325</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73325</guid><dc:creator><![CDATA[Moking C]]></dc:creator><pubDate>Wed, 26 Jan 2022 08:21:03 GMT</pubDate></item><item><title><![CDATA[Reply to Need help with replacing&#x2F;editing lines! on Wed, 26 Jan 2022 08:33:18 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a> and <strong>All</strong>,</p>
<p dir="auto">You’re right about wanting a <strong>full insight</strong> of the solution. Hopefully, this regex is <strong>not very</strong> difficult to understand :</p>
<ul>
<li>
<p dir="auto">The <strong><code>^0$</code></strong> part searches for a single <strong><code>0</code></strong> between <strong>beginning</strong> of line ( <strong><code>^</code></strong> ) and <strong>end</strong> ( <strong><code>$</code></strong> ) of <strong>current</strong> line</p>
</li>
<li>
<p dir="auto">The <strong><code>^.+e-.+</code></strong> part searches, from <strong>beginning</strong> of line ( <strong><code>^</code></strong> ), for any <strong>non-null</strong> text, followed with the string <strong><code>e- </code></strong>, with this  <strong>exact</strong> case, and followed with any <strong>non-null</strong> text ,again, till the <strong>end</strong> of line</p>
</li>
<li>
<p dir="auto">At <strong>beginning</strong>, the part <strong><code>(?-is)</code></strong> part are  <strong>in-line modifiers</strong> which mean :</p>
<ul>
<li>
<p dir="auto">Any <strong>regex</strong> <strong><code>.</code></strong> symbol refer to a <strong>single standard</strong> character ( <strong>Not</strong> <strong><code>EOL</code></strong> ones ) : modifier <strong><code>-s</code></strong></p>
</li>
<li>
<p dir="auto">Any search is <strong>sensible</strong> to <strong>case</strong> : modifier <strong><code>-i</code></strong> ( <strong>not</strong> insensible  ! )</p>
</li>
</ul>
</li>
</ul>
<hr />
<p dir="auto">For <strong>further</strong> learning about regexes, see :</p>
<ul>
<li>
<p dir="auto">The <strong>official</strong> N++ documentation : <a href="https://npp-user-manual.org/docs/searching/#regular-expressions" rel="nofollow ugc">https://npp-user-manual.org/docs/searching/#regular-expressions</a></p>
</li>
<li>
<p dir="auto">The Regex <strong>FAQ</strong> : <a href="https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation">https://community.notepad-plus-plus.org/topic/15765/faq-desk-where-to-find-regular-expressions-regex-documentation</a></p>
</li>
</ul>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73324</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73324</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 26 Jan 2022 08:33:18 GMT</pubDate></item><item><title><![CDATA[Reply to Need help with replacing&#x2F;editing lines! on Wed, 26 Jan 2022 08:09:46 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> Could you please kindly explain this: <strong>(?-is)^0$|^.+e-.+</strong><br />
I understand it contains several parts but have no idea of their meanings.<br />
I want to understand it so I can hopefully modify it in the future in case some similar problem came up.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73323</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73323</guid><dc:creator><![CDATA[Moking C]]></dc:creator><pubDate>Wed, 26 Jan 2022 08:09:46 GMT</pubDate></item><item><title><![CDATA[Reply to Need help with replacing&#x2F;editing lines! on Wed, 26 Jan 2022 08:05:04 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> Wow, thank you so much for the help! I tried and it works perfectly.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73321</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73321</guid><dc:creator><![CDATA[Moking C]]></dc:creator><pubDate>Wed, 26 Jan 2022 08:05:04 GMT</pubDate></item><item><title><![CDATA[Reply to Need help with replacing&#x2F;editing lines! on Wed, 26 Jan 2022 07:58:37 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/24294">@moking-c</a> and <strong>All</strong>,</p>
<ul>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog ( <strong><code>Ctrl + H</code></strong> )</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>(?-is)^0$|^.+e-.+</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>0.000</code></strong></p>
</li>
<li>
<p dir="auto"><strong>Tick</strong> the <strong><code>Wrap around</code></strong> option</p>
</li>
<li>
<p dir="auto"><strong>Select</strong> the <strong><code>Regular expression</code></strong> search <strong>mode</strong></p>
</li>
<li>
<p dir="auto">Click <strong>once</strong>, on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
</li>
<li>
<p dir="auto">Close the <strong>Replace</strong> dialog ( <strong><code>ESC</code></strong> )</p>
</li>
</ul>
<p dir="auto">Voila !</p>
<p dir="auto">In order to <strong>verify</strong>, you may use, first, the <strong><code>Replace</code></strong> button, a <strong>few</strong> times, before clicking on the <strong><code>Replace All</code></strong> button !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/73320</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/73320</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 26 Jan 2022 07:58:37 GMT</pubDate></item></channel></rss>