<?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 Guidance -- How can I find a specific line segment and remove all spaces and tabs from ONLY that segment.]]></title><description><![CDATA[<p dir="auto">Ex. I want to find all “EQD” lines and remove all spaces and tabs from JUST those lines.</p>
<p dir="auto">See below sample data, as you can see 2 of the 3 EQD lines have a space. I need to remove any “space” or “tab” from just that line.</p>
<p dir="auto">EQD+CN+ZMLU XXXXXXX+45GP+++5<br />
NAD+CA+ZMLU:172:ZZZ<br />
LOC+147+0260808::5<br />
FTX+AAA+++ALUMINUM ARTICLES<br />
MEA+WT++KGM:16549<br />
LOC+9+DOHAI:139:6<br />
LOC+11+USSAV:139:6<br />
RFF+BM:1<br />
EQD+CN+ZMLU XXXXXXX+45GP+++5<br />
NAD+CA+ZMLU:172:ZZZ<br />
LOC+147+0260202::5<br />
FTX+AAA+++ALCOHOLIC BEVERAGES<br />
MEA+WT++KGM:27797<br />
LOC+9+JMKIN:139:6<br />
LOC+11+USSAV:139:6<br />
RFF+BM:1<br />
EQD+CN+ZMLUXXXXXXX+45GP+++5<br />
NAD+CA+ZMLU:172:ZZZ</p>
<p dir="auto">I appreciate everyone’s time that is looking into this.</p>
<p dir="auto">Cheers</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/21896/need-guidance-how-can-i-find-a-specific-line-segment-and-remove-all-spaces-and-tabs-from-only-that-segment</link><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2026 23:43:45 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/21896.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Sep 2021 19:17:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Need Guidance -- How can I find a specific line segment and remove all spaces and tabs from ONLY that segment. on Wed, 29 Sep 2021 18:23:27 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 very much the new update works great just what I needed. All the best and thank you <a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: Terry-R">@<bdi>Terry-R</bdi></a> and <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> for your time and guidance. Cheers</p>
]]></description><link>https://community.notepad-plus-plus.org/post/70147</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/70147</guid><dc:creator><![CDATA[John Tee]]></dc:creator><pubDate>Wed, 29 Sep 2021 18:23:27 GMT</pubDate></item><item><title><![CDATA[Reply to Need Guidance -- How can I find a specific line segment and remove all spaces and tabs from ONLY that segment. on Tue, 28 Sep 2021 19:53:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/john-tee" aria-label="Profile: John-Tee">@<bdi>John-Tee</bdi></a> said in <a href="/post/70094">Need Guidance -- How can I find a specific line segment and remove all spaces and tabs from ONLY that segment.</a>:</p>
<blockquote>
<p dir="auto">Is there a way to adjust the provided SEARCH: "  (?-s)(?-i:^EQD|(?!\A)\G).*?\K\h  " to further clean spaces and tabs for all the following lines at once: EQD, NAD, LOC, MAE, RFF  - but don’t touch line FTX?</p>
</blockquote>
<p dir="auto">Certainly. The changes are:<br />
for my regex it becomes (I made an additional change putting the ^ outside of the lookahead)<br />
<code>(?-is)^(?=EQD|NAD|LOC|MAE|RFF).*?\K\h</code><br />
and for <a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> regex it would be<br />
<code>(?-s)(?-i:^(EQD|NAD|LOC|MAE|RFF)|(?!\A)\G).*?\K\h</code></p>
<p dir="auto">You can easily see how it expands to any additional codes, so if you need to change it, you should be able to do so easily. Try that.</p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/70104</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/70104</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Tue, 28 Sep 2021 19:53:17 GMT</pubDate></item><item><title><![CDATA[Reply to Need Guidance -- How can I find a specific line segment and remove all spaces and tabs from ONLY that segment. on Tue, 28 Sep 2021 14:19:02 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> said in <a href="/post/70072">Need Guidance -- How can I find a specific line segment and remove all spaces and tabs from ONLY that segment.</a>:</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/guy038" aria-label="Profile: guy038">@<bdi>guy038</bdi></a> <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">Is there a way to adjust the provided SEARCH: "  (?-s)(?-i:^EQD|(?!\A)\G).*?\K\h  " to further clean spaces and tabs for all the following lines at once: EQD, NAD, LOC, MAE, RFF  - but don’t touch line FTX?</p>
<p dir="auto">I welcome your feedback and thank you both again for your time.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/70094</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/70094</guid><dc:creator><![CDATA[John Tee]]></dc:creator><pubDate>Tue, 28 Sep 2021 14:19:02 GMT</pubDate></item><item><title><![CDATA[Reply to Need Guidance -- How can I find a specific line segment and remove all spaces and tabs from ONLY that segment. on Mon, 27 Sep 2021 20:17:54 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/john-tee" aria-label="Profile: john-tee">@<bdi>john-tee</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: terry-r">@<bdi>terry-r</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">Ah, yes, <a class="plugin-mentions-user plugin-mentions-a" href="/user/terry-r" aria-label="Profile: terry-r">@<bdi>terry-r</bdi></a>, we may also use this variation :</p>
<p dir="auto"><strong><code>(?-is)^(?=EQD).*?\K\h</code></strong></p>
<hr />
<p dir="auto">Now, if more than <strong>one</strong> horizontal <strong>blank</strong> char is present, in a line <strong>beginning</strong> with <strong><code>EQD</code></strong>, these <strong>two</strong> syntaxes do <strong>not</strong> work !</p>
<p dir="auto">In that case, we need to use the <strong>generic</strong> regex, belox, discussed in other posts, like this one :</p>
<p dir="auto"><a href="https://community.notepad-plus-plus.org/post/62799">https://community.notepad-plus-plus.org/post/62799</a></p>
<p dir="auto">SEARCH <strong><code>(?-i:</code>BSR<code>|(?!\A)\G)(?s:(?!</code>ESR<code>).)*?\K(?-i:</code>FR<code>)</code></strong></p>
<p dir="auto">REPLACE <strong>RR</strong></p>
<p dir="auto">where :</p>
<ul>
<li>
<p dir="auto"><strong>FR</strong> (<strong><code>Find Regex</code></strong> ) is the regex which defines the <strong>char</strong>, <strong>string</strong> or <strong>expression</strong> to be searched</p>
</li>
<li>
<p dir="auto"><strong>RR</strong> (<strong><code>Replacement Regex</code></strong> ) is the regex which defines the <strong>char</strong>, <strong>string</strong> or <strong>expression</strong> which must replace the <strong>FR</strong> expression</p>
</li>
<li>
<p dir="auto"><strong>BSR</strong> ( <strong><code>Begin Search-region Regex</code></strong> ) is the regex which defines the <strong>beginning</strong> of the area where the search for <strong>FR</strong>, must <strong>start</strong></p>
</li>
<li>
<p dir="auto"><strong>ESR</strong> ( <strong><code>End Search-region Regex</code></strong>) is the regex which defines, <strong>implicitly</strong>, the area where the search for <strong>FR</strong>, must <strong>end</strong></p>
</li>
</ul>
<hr />
<p dir="auto">For <a class="plugin-mentions-user plugin-mentions-a" href="/user/john-tee" aria-label="Profile: John-Tee">@<bdi>John-Tee</bdi></a>’s need, we have :</p>
<ul>
<li>
<p dir="auto"><strong>FR</strong> = <strong><code>\h</code></strong></p>
</li>
<li>
<p dir="auto"><strong>RR</strong> = <strong><code>Empty string</code></strong></p>
</li>
<li>
<p dir="auto"><strong>BSR</strong> = <strong><code>^EQD</code></strong></p>
</li>
<li>
<p dir="auto"><strong>ESR</strong> is <strong>implicit</strong> and we don’t need the <strong><code>(?s:(?!</code>ESR<code>).)*?</code></strong> syntax . Indeed, due to the <strong><code>(?-s)</code></strong> <strong>modifier</strong>, the range of chars, matched with the part <strong><code>.*?</code></strong> <strong>cannot</strong> go <strong>beyond</strong> the <strong>current</strong> line, anyway, as the <strong>line-break</strong> char(s) are <strong>not</strong> allowed !</p>
</li>
</ul>
<p dir="auto">Thus, if <strong>several</strong> <strong><code>space</code></strong> or <strong><code>tabulation</code></strong> characters may appear in the <strong><code>EQD......</code></strong> lines, the <strong>appropriate</strong> regex S/R is rather :</p>
<p dir="auto">SEARCH <strong><code>(?-s)(?-i:^EQD|(?!\A)\G).*?\K\h</code></strong></p>
<p dir="auto">REPLACE <strong><code>Leave EMPTY</code></strong></p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/70072</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/70072</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 27 Sep 2021 20:17:54 GMT</pubDate></item><item><title><![CDATA[Reply to Need Guidance -- How can I find a specific line segment and remove all spaces and tabs from ONLY that segment. on Mon, 27 Sep 2021 19:33:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/john-tee" aria-label="Profile: John-Tee">@<bdi>John-Tee</bdi></a> said in <a href="/post/70068">Need Guidance -- How can I find a specific line segment and remove all spaces and tabs from ONLY that segment.</a>:</p>
<blockquote>
<p dir="auto">I want to find all “EQD” lines and remove all spaces and tabs from JUST those lines.</p>
</blockquote>
<p dir="auto">Using the Replace function we have:<br />
Find What:<code>(?-is)(?=^EQD).*?\K\h</code><br />
Replace With:<code>nothing in this field</code> empty</p>
<p dir="auto">As this is a regular expression the search mode MUST be regular expression and you must use the “Replace All” button as I have used the <code>\K</code> meta character in the expression. Run it multiple times if any line has more than 1 instance of a blank space or tab (you can see when it’s completed when the Replace Window states “0 occurances were replaced in entire file”. This expression will remove ONLY one at a time from each of the lines with <code>EQD</code> in then, it will not touch any line with <code>eqd</code></p>
<p dir="auto">Terry</p>
]]></description><link>https://community.notepad-plus-plus.org/post/70069</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/70069</guid><dc:creator><![CDATA[Terry R]]></dc:creator><pubDate>Mon, 27 Sep 2021 19:33:36 GMT</pubDate></item></channel></rss>