<?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 need to delete two characters in two continuous lines]]></title><description><![CDATA[<p dir="auto">Hi, I need your help to solve one, I suppose, single thing… I have some files with data in this format:<br />
[<br />
-90.67575919025678,<br />
14.12140539076991,<br />
0<br />
],<br />
[<br />
-90.67691295444409,<br />
14.11436171657998,<br />
0<br />
],<br />
…</p>
<p dir="auto">The thing is that I need to delete the last two characters in the square brackets the “,” and the “0”, so it must seem like:</p>
<p dir="auto">[<br />
-90.67575919025678,<br />
14.12140539076991<br />
],<br />
[<br />
-90.67691295444409,<br />
14.11436171657998<br />
],</p>
<p dir="auto">Any suggestion on how can I do that?</p>
<p dir="auto">Thanks,</p>
<p dir="auto">Billy</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/17576/i-need-to-delete-two-characters-in-two-continuous-lines</link><generator>RSS for Node</generator><lastBuildDate>Tue, 13 Oct 2026 18:24:32 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/17576.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 06 May 2019 20:24:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Tue, 07 May 2019 12:29:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: PeterJones">@<bdi>PeterJones</bdi></a> said:</p>
<blockquote>
<p dir="auto">Meta, how do you see what the original text was?</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a> YEA!  How about it Meta??</p>
]]></description><link>https://community.notepad-plus-plus.org/post/43001</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/43001</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 07 May 2019 12:29:50 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 23:20:57 GMT]]></title><description><![CDATA[<p dir="auto">Thank you guys… it worked as expected and as desired.</p>
<p dir="auto">Thanks a lot… it really helps me a lot and makes my life easier.</p>
<p dir="auto">Best regards,</p>
<p dir="auto">Billy</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42982</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42982</guid><dc:creator><![CDATA[Billy Martin]]></dc:creator><pubDate>Mon, 06 May 2019 23:20:57 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 22:29:03 GMT]]></title><description><![CDATA[<p dir="auto">This has nothing to do with the main topic.  Sorry for the tangent, but I’m curious:</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/meta-chuh" aria-label="Profile: Meta-Chuh">@<bdi>Meta-Chuh</bdi></a> said:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/billy-martin" aria-label="Profile: Billy-Martin">@<bdi>Billy-Martin</bdi></a>,<br />
your original text is:</p>
</blockquote>
<p dir="auto">Meta, how do you see what the original text was?  In some other forums, I am able to view the source of the post, and that shows the pre-edited version… but I when I view the source in the Notepad++ Community forum, I don’t see anything with the spaces.  Where did you get the original from?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42977</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42977</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 06 May 2019 22:29:03 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 22:25:43 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/billy-martin" aria-label="Profile: billy-martin">@<bdi>billy-martin</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/peterjones" aria-label="Profile: peterjones">@<bdi>peterjones</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Ah ! Nice, <strong>Peter</strong>, I was about to post a <strong>solution</strong>, but you beat me to it ;-))</p>
<p dir="auto">And, of course, our solutions are <strong>identical</strong></p>
<p dir="auto">SEARCH <strong><code>,\R\h*0(?=\R\h*\],)</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<p dir="auto">So, I just give some explanations to <strong>Billy</strong>, on this <strong>regex</strong> S/R :</p>
<ul>
<li>
<p dir="auto">The <strong><code>\R</code></strong> syntax represents any form of <strong>line-break</strong> ( <strong><code>\r\n</code></strong> for <strong>Windows</strong> files, <strong><code>\n</code></strong> for <strong>Unix</strong> files and <strong><code>\r</code></strong> for <strong>Mac</strong> files )</p>
</li>
<li>
<p dir="auto">The <strong><code>\h*</code></strong> part matches any range, even <strong>null</strong>, of <strong>horizontal blank</strong> characters, i.e. <strong>space</strong>, <strong>tabulation</strong> and <strong>no-breaking space</strong> character, of respective <strong>Unicode</strong> values <strong><code>\x{0020}</code></strong>, <strong><code>\x{0009}</code></strong> and <strong><code>\x{00A0</code></strong> )</p>
</li>
<li>
<p dir="auto">The character <strong><code>[</code></strong>, being a <strong>regex meta</strong>-character, must be <strong>escaped</strong> with the <strong><code>\</code></strong> character, to be interpreted as a <strong>literal</strong></p>
</li>
<li>
<p dir="auto">So, the <strong>search</strong> regex looks for a <strong>comma</strong>, followed with a <strong>line-break</strong>, then some <strong>possible blank</strong> chars and, finally, a <strong>zero</strong></p>
</li>
<li>
<p dir="auto">But ONLY IF the <strong>look-ahead</strong> structure <strong><code>(?=\R\h*\],)</code></strong> is <strong>true</strong> i. e. if the <strong>zero</strong> digit is <strong>immediately</strong> followed with a <strong>line-break</strong>, then <strong>possible blank</strong> characters and, finally, the string <strong><code>],</code></strong></p>
</li>
<li>
<p dir="auto">As the <strong>replace</strong> zone is <strong>empty</strong>, the search <strong>match</strong> <strong><code>,\R\h*0</code></strong>, described above, is simply <strong>deleted</strong></p>
</li>
</ul>
<p dir="auto">Best Regards</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42976</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42976</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 06 May 2019 22:25:43 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 21:55:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/billy-martin" aria-label="Profile: Billy-Martin">@<bdi>Billy-Martin</bdi></a> ,</p>
<p dir="auto">I believe you should be able to update your find to: <code>,\R\h*0\R(?=\h*\])</code>.  The <code>\h*</code> adds a match of 0 or more horizontal spaces (space or tab).</p>
<p dir="auto">Actually, given your original spec, saying the closing <code>]</code> should be on a separate line, I would actually say</p>
<ul>
<li><code>,\R\h*0(?=\R\h*\])</code><br />
(which moves the newline after the 0 to <em>not</em> be deleted)</li>
</ul>
<p dir="auto">For me, this converts</p>
<pre><code>        [
          -90.89344601114183,
          14.26720713414475,
          0
        ],
        [
          -90.89410910416692,
          14.2672050050027,
          0
        ],
        [
          -90.89397902924168,
          14.26244600987243,
          0
        ]
</code></pre>
<p dir="auto">to</p>
<pre><code>        [
          -90.89344601114183,
          14.26720713414475
        ],
        [
          -90.89410910416692,
          14.2672050050027
        ],
        [
          -90.89397902924168,
          14.26244600987243
        ]
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/42971</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42971</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Mon, 06 May 2019 21:55:54 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 21:06:41 GMT]]></title><description><![CDATA[<p dir="auto">Hi… Thanks… I’ve tried that in a new document and worked either. But in the original files the strings starts after three tab spaces… how can I add them into the search expression to match the string? is there any tab char I can add or how to add the 15 blank spaces between?</p>
<pre><code>        [
          -90.89344601114183,
          14.26720713414475,
          0
        ],
        [
          -90.89410910416692,
          14.2672050050027,
          0
        ],
        [
          -90.89397902924168,
          14.26244600987243,
          0
        ]
</code></pre>
]]></description><link>https://community.notepad-plus-plus.org/post/42965</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42965</guid><dc:creator><![CDATA[Billy Martin]]></dc:creator><pubDate>Mon, 06 May 2019 21:06:41 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 21:00:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/billy-martin" aria-label="Profile: Billy-Martin">@<bdi>Billy-Martin</bdi></a></p>
<p dir="auto">your original text is:</p>
<pre><code>[
              -90.67575919025678,
              14.12140539076991,
              0
            ],
            [
              -90.67691295444409,
              14.11436171657998,
              0
            ],
...

The thing is that I need to delete the last two characters in the square brackets the "," and the "0", so it must seem like:

[
              -90.67575919025678,
              14.12140539076991
            ],
            [
              -90.67691295444409,
              14.11436171657998
            ],
</code></pre>
<p dir="auto">you have to embed it between two lines of <code>```</code> (tripple backticks) otherwise your code gets stripped.</p>
<p dir="auto">best regards.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42964</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42964</guid><dc:creator><![CDATA[Meta Chuh]]></dc:creator><pubDate>Mon, 06 May 2019 21:00:52 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 20:55:47 GMT]]></title><description><![CDATA[<p dir="auto">Just tried it the same as Alan, it worked for me and reported that two occurrences were found/deleted.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42962</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42962</guid><dc:creator><![CDATA[Karsten75]]></dc:creator><pubDate>Mon, 06 May 2019 20:55:47 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 20:47:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/billy-martin" aria-label="Profile: Billy-Martin">@<bdi>Billy-Martin</bdi></a></p>
<p dir="auto">I copied the original text you gave out of the forum and into Notepad++.  Then I used the Find expression I provided.  It matched for me.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42960</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42960</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 06 May 2019 20:47:57 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 20:45:27 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Alan, I’ve tried that expression but it says that cannot find the text.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42959</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42959</guid><dc:creator><![CDATA[Billy Martin]]></dc:creator><pubDate>Mon, 06 May 2019 20:45:27 GMT</pubDate></item><item><title><![CDATA[Reply to I need to delete two characters in two continuous lines on Mon, 06 May 2019 20:33:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/billy-martin" aria-label="Profile: Billy-Martin">@<bdi>Billy-Martin</bdi></a></p>
<p dir="auto">Well, if all your data is really that simple, this seems to match it:</p>
<p dir="auto">FInd <code>,\R0\R(?=\])</code><br />
Search mode: Regular expression</p>
<p dir="auto">You can replace it with “nothing”.</p>
<p dir="auto">I’d be careful using it, though.  There might be more to the story that you haven’t told us.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/42955</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/42955</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 06 May 2019 20:33:55 GMT</pubDate></item></channel></rss>