<?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 characters length of value after second comma]]></title><description><![CDATA[<p dir="auto">Well you guys are my last help or I face a night of hard work so here goes.</p>
<p dir="auto">Essentially the question I need help with is simple; the value that appears between the second and third comma on each line starting with a set value, need to be trimmed to a max of 35.</p>
<p dir="auto">example</p>
<p dir="auto">ARC,value1,<strong>value2</strong>,value3,value,4,value5</p>
<p dir="auto">the actual character string in Value2 should be trimmed down on the right side so that the overall length does not exceed 35 characters. Each sentence would start with the leading character ARC, if that is of any help.</p>
<p dir="auto">is this possible in Notepass++ ?</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24383/trim-characters-length-of-value-after-second-comma</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 20:10:20 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24383.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 18 Apr 2023 19:21:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to trim characters length of value after second comma on Sun, 23 Apr 2023 07:41:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: Terry-R">@<bdi>Terry-R</bdi></a> Thank you so much, apologies for the late reply, but this really did help. Thank you for taking the time to help!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/85907</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/85907</guid><dc:creator><![CDATA[Lucius Balfour]]></dc:creator><pubDate>Sun, 23 Apr 2023 07:41:21 GMT</pubDate></item><item><title><![CDATA[Reply to trim characters length of value after second comma on Tue, 18 Apr 2023 20:02:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lucius-balfour" aria-label="Profile: Lucius-Balfour">@<bdi>Lucius-Balfour</bdi></a> said in <a href="/post/85791">trim characters length of value after second comma</a>:</p>
<blockquote>
<p dir="auto">The area of interest is the bold section, which contains only letters, no funny  characters, which needs to be trimmed down from the right to a max of 35 characters</p>
</blockquote>
<p dir="auto">My solution is a regular expression which means the search mode must be set to regular expression.<br />
Find What:<code>^(ARC,[^,]+,[^,]{1,35})[^,]*</code><br />
Replace With:<code>${1}</code></p>
<p dir="auto">Give this a try on a copy of your data. As you have only supplied 1 dummy example line and that wasn’t within the code block (as I requested, see other’s examples as supplied) there is a chance you may still have problems.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/85798</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/85798</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Tue, 18 Apr 2023 20:02:28 GMT</pubDate></item><item><title><![CDATA[Reply to trim characters length of value after second comma on Tue, 18 Apr 2023 19:55:35 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> Correct!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/85796</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/85796</guid><dc:creator><![CDATA[Lucius Balfour]]></dc:creator><pubDate>Tue, 18 Apr 2023 19:55:35 GMT</pubDate></item><item><title><![CDATA[Reply to trim characters length of value after second comma on Tue, 18 Apr 2023 19:54:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lucius-balfour" aria-label="Profile: Lucius-Balfour">@<bdi>Lucius-Balfour</bdi></a> said in <a href="/post/85791">trim characters length of value after second comma</a>:</p>
<blockquote>
<p dir="auto">which needs to be trimmed down from the right to a max of 35 characters</p>
</blockquote>
<p dir="auto">Thus, you’d want to achieve:</p>
<p dir="auto"><code>ARC,1234567898765,john paul ringo mick keith michael ,12345,67892, 99922288822</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/85795</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/85795</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 18 Apr 2023 19:54:19 GMT</pubDate></item><item><title><![CDATA[Reply to trim characters length of value after second comma on Tue, 18 Apr 2023 19:50:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lucius-balfour" aria-label="Profile: Lucius-Balfour">@<bdi>Lucius-Balfour</bdi></a> said in <a href="/post/85791">trim characters length of value after second comma</a>:</p>
<blockquote>
<p dir="auto">Thanks Peter, no i am not looking to change an actual value, just a way to reduce the number of characters</p>
</blockquote>
<p dir="auto">Sorry, somehow, I misread, and thought you were talking about math (trimming down to a value between 0 and 35).  Yes, length is easier.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/85793</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/85793</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 18 Apr 2023 19:50:37 GMT</pubDate></item><item><title><![CDATA[Reply to trim characters length of value after second comma on Tue, 18 Apr 2023 19:49:25 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> Thanks Peter, no i am not looking to change an actual value, just a way to reduce the number of characters between 2nd and 3rd comma to 35, in each line that starts with ARC.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/85792</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/85792</guid><dc:creator><![CDATA[Lucius Balfour]]></dc:creator><pubDate>Tue, 18 Apr 2023 19:49:25 GMT</pubDate></item><item><title><![CDATA[Reply to trim characters length of value after second comma on Tue, 18 Apr 2023 19:47:41 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: Terry-R">@<bdi>Terry-R</bdi></a></p>
<p dir="auto">Hi Terry thanks so much for responding.</p>
<p dir="auto">Typically a line of data would look as follows</p>
<p dir="auto">ARC,1234567898765,<strong>john paul ringo mick keith michael gabriel pete grace mark</strong>,12345,67892, 99922288822</p>
<p dir="auto">The area of interest is the bold section, which contains only letters, no funny  characters, which needs to be trimmed down from the right to a max of 35 characters .</p>
]]></description><link>https://community.notepad-plus-plus.org/post/85791</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/85791</guid><dc:creator><![CDATA[Lucius Balfour]]></dc:creator><pubDate>Tue, 18 Apr 2023 19:47:41 GMT</pubDate></item><item><title><![CDATA[Reply to trim characters length of value after second comma on Tue, 18 Apr 2023 19:41:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lucius-balfour" aria-label="Profile: Lucius-Balfour">@<bdi>Lucius-Balfour</bdi></a> said in <a href="/post/85787">trim characters length of value after second comma</a>:</p>
<blockquote>
<p dir="auto">need to be trimmed to a max of 35.</p>
</blockquote>
<p dir="auto">If you mean that it should change 39 or 123 to 35, but leave 12 as 12, then Notepad++ cannot do that natively – at least, not in the generic sense.  If your hard limit of 35 will never change, then a regex could be developed that would only do the replacement if an integer from 0 to 35 were not found in the <strong>value2</strong> field.  But if today you want the cutoff to be 35, but tomorrow you want it to be 123, and on Friday you want it to be 13, then either you’d have to redo your regex every time, or you’d need a scripting solution to bring in “math” features, per <a href="https://community.notepad-plus-plus.org/topic/23170/faq-desk-can-i-do-a-mathematical-replacement">this FAQ</a>.</p>
<p dir="auto">If all you will need is for a limit of 35, and that limit will never change, then as long as you answer <a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: Terry-R">@<bdi>Terry-R</bdi></a>’s followup, he or someone else here should be able to come up with a regex that will meet your needs.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/85790</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/85790</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Tue, 18 Apr 2023 19:41:55 GMT</pubDate></item><item><title><![CDATA[Reply to trim characters length of value after second comma on Tue, 18 Apr 2023 19:30:38 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/lucius-balfour" aria-label="Profile: Lucius-Balfour">@<bdi>Lucius-Balfour</bdi></a><br />
It is possible, but you haven’t given us much to work with. The primary issue (as I see it) is that the values could also contain a comma and then they would likely be contained within quotes. This is normally how a CSV file (which seems to be the type of data you are showing) will appear.</p>
<p dir="auto">Are you able to show some example data (as long as not sensitive/confidential information)? When doing so, please read the FAQ post called <a href="https://community.notepad-plus-plus.org/topic/22022/faq-desk-template-for-search-replace-questions">Template for Search/Replace Questions</a>. It is necessary to insert examples in the correct manner as otherwise the posting engine can alter the data.</p>
<p dir="auto">In your case if quotes are included then is is very necessary as quotes are one of the most common issues we see with example data.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/85788</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/85788</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Tue, 18 Apr 2023 19:30:38 GMT</pubDate></item></channel></rss>