<?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[Trim length between two characters]]></title><description><![CDATA[<p dir="auto">What I need to do is trim the last character between the , and , if the length is 12 or greater which would then make the length 11.</p>
<p dir="auto">This is before</p>
<p dir="auto">#,610079544260,1<br />
#,205300099864,1<br />
#,65433455333,5<br />
#,205300022008,1<br />
#,3360,20<br />
#,718103267854,2<br />
#,67764334775,8</p>
<p dir="auto">This is what it should look like after</p>
<p dir="auto">#,61007954426,1<br />
#,20530009986,1<br />
#,65433455333,5<br />
#,20530002200,1<br />
#,3360,20<br />
#,71810326785,2<br />
#,67764334775,8</p>
<p dir="auto">Thank you</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/17963/trim-length-between-two-characters</link><generator>RSS for Node</generator><lastBuildDate>Wed, 16 Sep 2026 09:21:00 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/17963.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 15 Jul 2019 16:49:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Trim length between two characters on Mon, 15 Jul 2019 22:13:06 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/sean" aria-label="Profile: sean">@<bdi>sean</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/steven-haymes" aria-label="Profile: steven-haymes">@<bdi>steven-haymes</bdi></a>, and <strong>All</strong>,</p>
<p dir="auto">I’m afraid that, in order to use the <strong>column mode</strong>, in a <strong>reliable</strong> way, we should align the <strong>comma</strong> symbols, <strong>padding</strong> preceding positions with <strong>spaces</strong> chars !</p>
<p dir="auto">So, this time, the <strong>regex</strong> solution seems to be more <strong>secure</strong> ;-))</p>
<p dir="auto">For instance, with that <strong>sample</strong> text, below :</p>
<pre><code class="language-diff">#,6100795442608787,1
#,205300099864,1
#,65433455333,5
#,20530002200815618844,1
#,3360,20
#,718103267854,2
#,67764334775,8
</code></pre>
<p dir="auto">Here is a <strong>regex</strong> S/R which <strong>deletes</strong> any <strong>non-null</strong> range of <strong>digits</strong>, after the <strong><code>11th</code></strong>, till the <strong>second comma</strong> of each line :</p>
<ul>
<li>
<p dir="auto">SEARCH <strong><code>^#,\d{</code>11<code>}\K\d+(?=,)</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
</li>
<li>
<p dir="auto">Tick the <strong><code>Wrap around</code></strong></p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search mode</p>
</li>
<li>
<p dir="auto">Click, <strong>exclusively</strong>, on the <strong><code>Replace All</code></strong> button</p>
</li>
</ul>
<p dir="auto">And, we would obtain the <strong>expected</strong> result :</p>
<pre><code class="language-diff">#,61007954426,1
#,20530009986,1
#,65433455333,5
#,20530002200,1
#,3360,20
#,71810326785,2
#,67764334775,8
</code></pre>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/45393</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/45393</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 15 Jul 2019 22:13:06 GMT</pubDate></item><item><title><![CDATA[Reply to Trim length between two characters on Mon, 15 Jul 2019 21:10:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/steven-haymes" aria-label="Profile: Steven-Haymes">@<bdi>Steven-Haymes</bdi></a></p>
<p dir="auto">I made the assumption that the OP may have other lines (that are longer) intermingled with the ones shown that he doesn’t want affected.  Otherwise, yes, you are right, this is a good application of column mode editing, perhaps in combination with the Begin/End Select command, which also works with column mode editing, although it is a bit obscure (you have to get into column mode as you are positioning the caret for the “end select”).</p>
]]></description><link>https://community.notepad-plus-plus.org/post/45391</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/45391</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 15 Jul 2019 21:10:36 GMT</pubDate></item><item><title><![CDATA[Reply to Trim length between two characters on Mon, 15 Jul 2019 20:27:44 GMT]]></title><description><![CDATA[<p dir="auto">If the file is not too long, you can always use Column Mode with the Alt key.  I do similar operations on CSV files all the time.  Regular expressions are more elegant though.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/45390</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/45390</guid><dc:creator><![CDATA[Steven Haymes]]></dc:creator><pubDate>Mon, 15 Jul 2019 20:27:44 GMT</pubDate></item><item><title><![CDATA[Reply to Trim length between two characters on Mon, 15 Jul 2019 17:11:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: Alan-Kilborn">@<bdi>Alan-Kilborn</bdi></a></p>
<p dir="auto">Perfect thank you very much.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/45383</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/45383</guid><dc:creator><![CDATA[Sean]]></dc:creator><pubDate>Mon, 15 Jul 2019 17:11:45 GMT</pubDate></item><item><title><![CDATA[Reply to Trim length between two characters on Mon, 15 Jul 2019 17:05:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sean" aria-label="Profile: Sean">@<bdi>Sean</bdi></a></p>
<p dir="auto">You might try:</p>
<p dir="auto">Find: <code>^(#,\d{11})\d(?=,)</code><br />
Replace: <code>\1</code><br />
Search mode: Regular expression</p>
]]></description><link>https://community.notepad-plus-plus.org/post/45382</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/45382</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Mon, 15 Jul 2019 17:05:15 GMT</pubDate></item></channel></rss>