<?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[Advance Replace including right trim (repost with example)]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I have read many posts on the subject but cannot find the desired solution. I posted this question before but repost it now with example and something i forgot to mention. (couldn’t edit original post)<br />
For those who replied to my original deleted post, thanks so far but the solutions didn’t work.<br />
issue is as follows:<br />
I have a CSV-file that i want to use as an external table in Oracle.<br />
It is formatted like this:<br />
&lt;values Field01&gt;;&lt;values Field02&gt;;&lt;values Field03&gt;; &lt;values Field04&gt;<br />
In fact there are more fields, but my issue is with the last field.<br />
Field 1 to 3 are defined as Char (255) fields in the oracle external table.<br />
The last field, Field04, is a memo field that should be max. 4000 characters in the interface CSV-file, but probably due to codeset the last field is way over 4000 Characters. (according to Excel)<br />
In this last field LineFeed characters might be present.<br />
End of record/line is with CarriageReturn + LineFeed.</p>
<p dir="auto">I need to find the pattern like "n-characters field01"Semicolon"n-characters field02"Semicolon"n-characters field03"Semicolon (or last delimiter found)<br />
and trim the rest after the last semicolon to 4000 characters to let it fit in the Oracle table.<br />
so field 1 to 3 with variable length + 4000 additional characters for field04.</p>
<p dir="auto">For my example instead of max 4000 characters lets say it is max 10 characters until EOL i want in the last field.<br />
I want this original file:<br />
xxxxxxxxxxxx;yyyy;zzzzzzzzzz;12\n34\n5678901234567890\r\n<br />
xxx;yyyyyyyy;zzzzzz;12345\r\n<br />
xxxxxx;yyy;zzzzzzzzzzzzzzzzzzz;1\n2\n3456789012345678901234567890\r\n<br />
xxxxxx;yyyyy;zzzzzzzzzzzzzzzzzzzzz;1234567890\r\n</p>
<p dir="auto">changed/replaced to:<br />
xxxxxxxxxxxx;yyyy;zzzzzzzzzz;12\n34\n5678\r\n<br />
xxx;yyyyyyyy;zzzzzz;12345\r\n<br />
xxxxxx;yyy;zzzzzzzzzzzzzzzzzzz;1\n2\n345678\r\n<br />
xxxxxx;yyyyy;zzzzzzzzzzzzzzzzzzzzz;1234567890\r\n</p>
<p dir="auto">Hope that there’s a Notepad++Wizard here that can solve this.</p>
<p dir="auto">Thanks in advance!<br />
Mike</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/26765/advance-replace-including-right-trim-repost-with-example</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 04:51:06 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/26765.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 Apr 2025 08:19:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Thu, 17 Apr 2025 22:11:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mike-albers" aria-label="Profile: Mike-Albers">@<bdi>Mike-Albers</bdi></a> said:</p>
<blockquote>
<p dir="auto">(?s)^(?:[^\r\n;];){N}.{0,3996}\r\n|^((?:[^\r\n;];){N}.{0,3996}).?\r\n|^(?:[^\r\n;]?)\r\n</p>
</blockquote>
<p dir="auto">Unfortunately, your regular expression was corrupted because you didn’t post it correctly.<br />
Probably a moderator will come along and examine your “raw” original post and correct it.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/101104</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101104</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Thu, 17 Apr 2025 22:11:15 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Thu, 17 Apr 2025 22:44:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mike-albers" aria-label="Profile: Mike-Albers">@<bdi>Mike-Albers</bdi></a><br />
Addition for people that will use this final solution in an Oracle database:<br />
I had memo-fields in my export CSV-file that were restricted to 4000 CHAR positions. (default is max 4000 in bytes)<br />
The regex-search was:</p>
<pre><code>(?s)^(?:[^\r\n;]*;){N}.{0,3996}\r\n|^((?:[^\r\n;]*;){N}.{0,3996}).*?\r\n|^(?:[^\r\n;]*?)\r\n
</code></pre>
<p dir="auto">N normal fields + 1 memo-field that contains linefeeds in the text.</p>
<p dir="auto">In Oracle i created an external file based on the CSV-file with truncated memo field.<br />
It proofed impossible to read 4000 characters because the \r\n is taken into the fieldvalue.<br />
Once in Oracle the linefeeds are counted as single characters, but i think that is based on codeset-settings. When counting the length of the oracle CHAR(4000 CHAR) field i found a max length of 3970 instead of 3996 as my truncate position.<br />
Keep this in mind otherwise you will get problems with reject limits.</p>
<p dir="auto">-–</p>
<p dir="auto"><em>moderator added code markdown around text; please don’t forget to <a href="https://community.notepad-plus-plus.org/topic/21925/faq-desk-formatting-forum-posts">use the <code>&lt;/&gt;</code> button to mark example text as “code”</a> so that characters don’t get changed by the forum</em></p>
]]></description><link>https://community.notepad-plus-plus.org/post/101100</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/101100</guid><dc:creator><![CDATA[Mike Albers]]></dc:creator><pubDate>Thu, 17 Apr 2025 22:44:37 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Sun, 13 Apr 2025 12:41:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a>   Hi guy, I studied your solution and Regex itself and it starts to dawn at me.<br />
I changed my testfile and tried in addition how to handle empty fields. For that i changed your searchstring a tiny bit but also added an extra OR clause.<br />
It seems to work properly now.</p>
<p dir="auto">My latest testfile was like this:<br />
<img src="/assets/uploads/files/1744547164692-testfile_02.jpg" alt="TESTFILE_02.JPG" class=" img-fluid img-markdown" /></p>
<p dir="auto">My search pattern is now:<br />
(?s)^(?:[^\r\n;]<em>;){3}.{0,24}\r\n|^((?:[^\r\n;]</em>;){3}.{0,24}).<em>?\r\n|^(?:[^\r\n;]</em>?)\r\n</p>
<p dir="auto">The replace statement is still yours:<br />
?1$1\r\n:$0</p>
<p dir="auto">Result was:<br />
<img src="/assets/uploads/files/1744547870522-file_after_replace.jpg" alt="File_after_replace.JPG" class=" img-fluid img-markdown" /></p>
<p dir="auto">I tried to figure out the replace string, but i don’t get it.<br />
(tried selfstudy on it with Regex0101 tool bit by bit but since it is not 100% compatible i couldn’t figure it out myself.) Really no lazyness on my part here when i ask my question.<br />
So i hope you can explain it step by step for me.</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100982</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100982</guid><dc:creator><![CDATA[Mike Albers]]></dc:creator><pubDate>Sun, 13 Apr 2025 12:41:32 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 16:36:05 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></p>
<p dir="auto">Amen.  Don’t change posts after posting them, unless you are 100% sure you aren’t changing any meaning.   That is, only change an obvious typo (but NOT one in an “expression”).  Otherwise, follow Peter’s excellent advice.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100902</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100902</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 09 Apr 2025 16:36:05 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 16:23:19 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> said,</p>
<blockquote>
<p dir="auto">It appears that Guy is uber-editing his earlier response</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mike-albers" aria-label="Profile: Mike-Albers">@<bdi>Mike-Albers</bdi></a> said,</p>
<blockquote>
<p dir="auto">Changed the reply asap</p>
</blockquote>
<p dir="auto">In general, my preference is that posts not get edited after there’s a reply, because that breaks the flow of the conversation.  In extreme circumstances, if there is an edit after a reply, I highly encourage marking it like “<strong>edit</strong>: xyz” or similar, or, if there’s a bunch of information that turns out to be wrong, using the ~~~ to strikethrough, like, “<s>old incorrect information</s> [<strong>edited: see my reply below</strong>]” .  This allows people to be able to see what was being responded to in the immediate replies, but informs them that something has been updated.</p>
<p dir="auto">It should be noted that even changing a post <em>before</em> there are any replies is dangerous, because someone may have read your original, and maybe even replying with quoting your original text, and having your text now be different makes it look like the person is misquoting you, which they are not actually doing.</p>
<p dir="auto">(This discussion has a case in point: Alan quoted the regex101 line, and now it’s been edited away.)</p>
<p dir="auto">As <a href="https://perlmonks.org/?node_id=17557" rel="nofollow ugc">said</a> in another forum where I spend a lot of time, “It is uncool to update a [post] in a way that renders replies confusing or meaningless”.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100898</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100898</guid><dc:creator><![CDATA[PeterJones]]></dc:creator><pubDate>Wed, 09 Apr 2025 16:23:19 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 15:32:32 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> you are right. I jumped to conslusions.<br />
Tried in notepad++ and the solution from guy seems to work after all.  Changed the reply asap. :-)</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100897</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100897</guid><dc:creator><![CDATA[Mike Albers]]></dc:creator><pubDate>Wed, 09 Apr 2025 15:32:32 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 15:18:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/alan-kilborn" aria-label="Profile: alan-kilborn">@<bdi>alan-kilborn</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">I agree that I edited my <strong>previous</strong> post a <strong>lot</strong> of times.</p>
<p dir="auto">But it’s just because if you just paste the <em>INPUT</em> text in a <strong>new</strong> tab, you get <strong>all</strong> the sentences with a final <strong>line-break</strong> = <strong><code>\r\n</code></strong></p>
<p dir="auto">And, of course, the regex S/R would <strong>not</strong> work in this case :-((</p>
<p dir="auto">BR</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100893</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100893</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 09 Apr 2025 15:18:19 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 15:20:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a></p>
<blockquote>
<p dir="auto">This post has 7 revisions</p>
</blockquote>
<p dir="auto">As I typed <em>my</em> reply, I kept seeing screen flashes, so I investigated.<br />
It appears that Guy is uber-editing his earlier response.<br />
Hopefully, he’s not changing history, and and is always making harmless edits.<br />
Otherwise, how is <a class="plugin-mentions-user plugin-mentions-a" href="/user/mike-albers" aria-label="Profile: Mike-Albers">@<bdi>Mike-Albers</bdi></a> to “keep up” with the advice being provided?</p>
<hr />
<p dir="auto">EDIT:  Now:</p>
<blockquote>
<p dir="auto">This post has 8 revisions</p>
</blockquote>
]]></description><link>https://community.notepad-plus-plus.org/post/100892</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100892</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 09 Apr 2025 15:20:13 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 15:06:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mike-albers" aria-label="Profile: Mike-Albers">@<bdi>Mike-Albers</bdi></a> said:</p>
<blockquote>
<p dir="auto">I tried out your solution with the online regex tool at regex101 site but it is not working.</p>
</blockquote>
<p dir="auto">Some of these regexes are quite “involved”.  The more involved they are, the less likely they are to work in both regex101 and Notepad++; the reason for this is that they use different regular expression engines and all engines have nuanced processing when the regexes are not simple.  It may not be the case here, but you should try all advice provided in Notepad++'s replace before coming to a conclusion.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100891</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100891</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Wed, 09 Apr 2025 15:06:34 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 15:30:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> Hi Guy, i think your solution is working after all.<br />
in the tool something strange happens. But in Notepad it seems to work properly.<br />
I tried it out on the testfile with the \n characters in the 4th field.<br />
Now i will try it on my real life CSV file to see what happens there.</p>
<p dir="auto">So far so good.</p>
<p dir="auto">Thanks!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100889</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100889</guid><dc:creator><![CDATA[Mike Albers]]></dc:creator><pubDate>Wed, 09 Apr 2025 15:30:45 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 14:25:14 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> Sorry Terry, I did not read all of it. I was confused because it wasn’t possible to edit my original post after 4 hours of first posting. Since there were just a few respondents it seemed better to have the complete issue on top of the post. Otherwise new replies would probably be based on old information provided. I guess that people will not go through all of the discussion first.<br />
sorry for the inconvenience.<br />
Would be nice when after the 4 hours a direct timestamped-addendum at the original post would be allowed instead of a reply.</p>
<p dir="auto">Will not make the same mistake again.</p>
<p dir="auto">Keep up the good work!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100886</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100886</guid><dc:creator><![CDATA[Mike Albers]]></dc:creator><pubDate>Wed, 09 Apr 2025 14:25:14 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 15:07:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mike-albers" aria-label="Profile: mike-albers">@<bdi>mike-albers</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/mark-olson" aria-label="Profile: mark-olson">@<bdi>mark-olson</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: terry-r">@<bdi>terry-r</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: coises">@<bdi>coises</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Ah, I now understand that <strong><code>\n</code></strong> may occur in the <strong>first</strong> <strong><code>4,000</code></strong> characters of the <strong>last</strong> field !</p>
<p dir="auto">A completely <strong>different</strong> goal to reach !</p>
<p dir="auto">If I still assume that <strong>no</strong> line-break occurs in the <strong>first</strong> <strong><code>3</code></strong> fields</p>
<p dir="auto">And given the <em>INPUT</em> file :</p>
<pre><code class="language-diff">xxxxxxxxxxxx;yyyy;zzzzzzzzzz;12
34
5678901234567890
xxx;yyyyyyyy;zzzzzz;12345
xxx;yyyyyyyy;zzzzzz;
xxxxxx;yyy;zzzzzzzzzzzzzzzzzzz;1
2
3456789012345678901234567890
xxxxxx;yyyyy;zzzzzzzzzzzzzzzzzzzzz;1234567890
</code></pre>
<p dir="auto"><em>IMPORTANT</em> : After pasting the <em>INPUT</em> code text above in a <strong>new</strong> tab, you must change, at the <strong>end</strong>, the current <strong><code>\r\n</code></strong> line-break by <strong><code>\n</code></strong> in lines <strong><code>1</code></strong>, <strong><code>2</code></strong>, <strong><code>6</code></strong> and <strong><code>7</code></strong>, as shown below, <em>BEFORE</em> you apply the <strong>regex</strong> S/R !</p>
<p dir="auto"><img src="/assets/uploads/files/1744210130287-1a741910-920e-4c99-bcd8-846df0f4d8b1-image.png" alt="1a741910-920e-4c99-bcd8-846df0f4d8b1-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">The  following <strong>regex</strong> S/R should work :</p>
<ul>
<li>
<p dir="auto">FIND <strong><code>(?s)^(?:[^\r\n;]+;){3}.{0,10}\r\n|^((?:[^\r\n;]+;){3}.{10}).+?\r\n</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>?1$1\r\n:$0</code></strong></p>
</li>
</ul>
<p dir="auto">And produce this <em>OUTPUT</em> text :</p>
<pre><code class="language-diff">xxxxxxxxxxxx;yyyy;zzzzzzzzzz;12
34
5678
xxx;yyyyyyyy;zzzzzz;12345
xxx;yyyyyyyy;zzzzzz;
xxxxxx;yyy;zzzzzzzzzzzzzzzzzzz;1
2
345678
xxxxxx;yyyyy;zzzzzzzzzzzzzzzzzzzzz;1234567890
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1744210374058-325fd192-722f-449e-bc09-33dd4f8240e3-image.png" alt="325fd192-722f-449e-bc09-33dd4f8240e3-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">As you can see, after the last <strong><code>;</code></strong> of <strong>each</strong> record :</p>
<ul>
<li>
<p dir="auto">The string <strong><code>12\n34\n5678</code></strong>, in lines <strong><code>1</code></strong>, <strong><code>2</code></strong> and <strong><code>3</code></strong>, <strong>correctly</strong> contains <strong><code>10</code></strong> characters and the final <strong><code>\r\n</code></strong></p>
</li>
<li>
<p dir="auto">The line <strong><code>4</code></strong> contains the string <strong><code>12345</code></strong> and the final <strong><code>\r\n</code></strong></p>
</li>
<li>
<p dir="auto">The line <strong><code>5</code></strong> contains an <strong>empty</strong> string and the final <strong><code>\r\n</code></strong></p>
</li>
<li>
<p dir="auto">The string <strong><code>1\n2\n345678</code></strong>, in lines <strong><code>6</code></strong>, <strong><code>7</code></strong> and <strong><code>8</code></strong>, <strong>correctly</strong> contains <strong><code>10</code></strong> characters and the final <strong><code>\r\n</code></strong></p>
</li>
<li>
<p dir="auto">The line <strong><code>9</code></strong> contains the string <strong><code>1234567890</code></strong> and the final <strong><code>\r\n</code></strong></p>
</li>
</ul>
<hr />
<p dir="auto">Now, as you said :</p>
<blockquote>
<p dir="auto">In fact there are more fields, but my issue is with the last field.</p>
</blockquote>
<p dir="auto">I suppose that you must change the numbers <strong><code>3</code></strong> of the regex by the <strong>exact</strong> number of fields before the <strong>last</strong> one, which size is over <strong><code>4,000</code></strong> characters</p>
<p dir="auto">Thus, the <strong>general</strong> regex S/R is :</p>
<ul>
<li>
<p dir="auto">FIND <strong><code>(?s)^(?:[^\r\n;]+;){</code>N<code>}.{0,4000}\r\n|^((?:[^\r\n;]+;){</code>N<code>}.{4000}).+?\r\n</code></strong></p>
</li>
<li>
<p dir="auto">REPLACE <strong><code>?1$1\r\n:$0</code></strong></p>
</li>
</ul>
<p dir="auto">Where <strong><code>N</code></strong> is the <strong>number</strong> of fields before the <strong>last</strong> one !</p>
<p dir="auto">If, in addition, the number of fields is <strong>variable</strong>, you could change the <strong>two</strong> <strong><code>[3}</code></strong> syntaxes by the <strong><code>{x,y}</code></strong> syntax, where <strong><code>x</code></strong> and <strong><code>y</code></strong> represent <strong>integers</strong></p>
<p dir="auto">Best regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100877</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100877</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 09 Apr 2025 15:07:34 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 11:56:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mike-albers" aria-label="Profile: Mike-Albers">@<bdi>Mike-Albers</bdi></a>:</p>
<p dir="auto">I <em>think</em> the expression you want is this:</p>
<p dir="auto"><strong><code>^((?:(?:[^";\r\n]*+|\h*+"(?:[^"]|"")*+"\h*+);){3})(?:([^";\r\n]{0,4000}+)[^";\r\n]*+|(\h*+"(?:[^"]|""){0,4000}+)(?:[^"]|"")*+("\h*+))$</code></strong></p>
<p dir="auto">with replacement:</p>
<p dir="auto"><strong><code>$1$2$3$4</code></strong></p>
<p dir="auto">In your example, you have values containing new line characters that are not quoted; that’s normally invalid in a CSV. If you really have that in your file, change the <strong><code>[^";\r\n]</code></strong> sequences to <strong><code>[^";\r]</code></strong>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100873</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100873</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Wed, 09 Apr 2025 11:56:00 GMT</pubDate></item><item><title><![CDATA[Reply to Advance Replace including right trim (repost with example) on Wed, 09 Apr 2025 08:42:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mike-albers" aria-label="Profile: Mike-Albers">@<bdi>Mike-Albers</bdi></a></p>
<p dir="auto">My immediate thought was to “undelete” your deleted post. I am a (recent new) moderator and I consider you deleting that post after others have posted replies to it to be “bad form”. You probably had the best of intentions but anyone coming along some time in the future will attempt to read that thread and it won’t make sense.</p>
<p dir="auto">That was your first mistake, the second was to start a new thread. It would have been preferable to just append this post to the original thread. We often have first time posters adding additional relevant information after prodding by the other members.</p>
<p dir="auto">Since this is just my opinion I won’t “undelete” nor “move” this to the original thread. I will leave that to a more senior moderator to consider.</p>
<p dir="auto">While I’m telling you what you should have done, here’s another one. When showing examples, please include them in a code box. That helps to prevent the posting engine from mangling the data.</p>
<p dir="auto">All of this information is in the FAQ and also pinned at the start of each category. Unfortunately you, like many new posters, don’t read them. Yet you post here in the hope to get answers, so I guess my question is why didn’t you read the FAQ and pinned posts?</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/100872</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/100872</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Wed, 09 Apr 2025 08:42:31 GMT</pubDate></item></channel></rss>