<?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[Replace tab spaces only inside quotations.]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I am quite stuck on this</p>
<p dir="auto">I have the following as an example</p>
<p dir="auto">Bit1		“Bit2	Bit3		Bit4		Bit5”</p>
<p dir="auto">I want to replace the tab in between Bit2, Bit3, Bit4 etc with a space, but leave the tab after Bit1, in short replace all tab chars inside quotations with a space.</p>
<p dir="auto">How can this be done, the file I have as over 40,000 lines like the example above so doing it by hand is not possible.</p>
<p dir="auto">Regards,</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/25636/replace-tab-spaces-only-inside-quotations</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 13:58:33 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/25636.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 01 Apr 2024 06:02:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Replace tab spaces only inside quotations. on Mon, 01 Apr 2024 08:31:14 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/uhax-the-grey" aria-label="Profile: uhax-the-grey">@<bdi>uhax-the-grey</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">Your solution, <a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: coises">@<bdi>coises</bdi></a>, seems to work <strong>only if</strong> :</p>
<ul>
<li>
<p dir="auto">A single <strong><code>"......"</code></strong> section exists in <strong>current</strong> line</p>
</li>
<li>
<p dir="auto"><strong>Line-ending</strong> char(s) end(s) the <strong>current</strong> line</p>
</li>
</ul>
<hr />
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/uhax-the-grey" aria-label="Profile: uhax-the-grey">@<bdi>uhax-the-grey</bdi></a>, the <strong>difficulty</strong> to achive that <strong>general</strong> goal is that the <strong>ending</strong> char of a section is the <em>SAME</em> char than its <strong>beginning</strong> char ( the <strong><code>"</code></strong> character ) :-((</p>
<p dir="auto">So I propose to <strong>split</strong> the problem in <strong><code>3</code></strong> <strong>successive</strong> steps :</p>
<ul>
<li>
<p dir="auto">First, we change any <strong>couple</strong> of <strong><code>"</code></strong> chars, of a <strong>single</strong> section, with <strong>two</strong> different <strong>control</strong> chars ( <strong><code>\x02</code></strong> and <strong><code>\x03</code></strong> )</p>
</li>
<li>
<p dir="auto">Secondly, we use the <strong>generic</strong> regex mechanism, described <a href="https://community.notepad-plus-plus.org/topic/22690/generic-regex-replacing-in-a-specific-zone-of-text/1?lang=fr">here</a>, to replace <strong>any</strong> <strong><code>\t</code></strong> character by a <strong>space</strong> char, in <strong><code>"............"</code></strong> sections <strong>only</strong></p>
</li>
<li>
<p dir="auto">Finally, we restore the <strong>two</strong> original <strong><code>"</code></strong> delimiters for <strong>each</strong> section</p>
</li>
</ul>
<hr />
<p dir="auto">This method leads to the <strong><code>3</code></strong> <strong>successive</strong> regex S/R below :</p>
<p dir="auto">SEARCH <strong><code>(?s)"(.*?)"</code></strong></p>
<p dir="auto">REPLACE <strong><code>\x02\1\x03</code></strong></p>
<p dir="auto">Then :</p>
<p dir="auto">SEARCH <strong><code>(?:\x02|(?!\A)\G)(?s:(?!\x03).)*?\K\t</code></strong></p>
<p dir="auto">REPLACE <strong><code>\x20</code></strong></p>
<p dir="auto"><strong>Remark</strong> : Do <strong>not</strong> forget to move the caret ( cursor ) at the <strong>very beginning</strong> of the <strong>current</strong> file, <strong>before</strong> running this <strong>second</strong> S/R !</p>
<p dir="auto">Finally :</p>
<p dir="auto">SEARCH <strong><code>[\x02\x03]</code></strong></p>
<p dir="auto">REPLACE <strong><code>"</code></strong></p>
<hr />
<p dir="auto">Whatever the position of the <strong>TAB</strong> chars and the <strong><code>"</code></strong> <strong>deleimiters</strong>, thoughout the text contents, this method should always work <strong>properly</strong> !</p>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/93947</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93947</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Mon, 01 Apr 2024 08:31:14 GMT</pubDate></item><item><title><![CDATA[Reply to Replace tab spaces only inside quotations. on Mon, 01 Apr 2024 06:42:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/coises" aria-label="Profile: Coises">@<bdi>Coises</bdi></a> That worked, thank you!</p>
]]></description><link>https://community.notepad-plus-plus.org/post/93942</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93942</guid><dc:creator><![CDATA[UHAX The Grey]]></dc:creator><pubDate>Mon, 01 Apr 2024 06:42:37 GMT</pubDate></item><item><title><![CDATA[Reply to Replace tab spaces only inside quotations. on Mon, 01 Apr 2024 06:26:23 GMT]]></title><description><![CDATA[<p dir="auto">Try this:</p>
<p dir="auto">From the main menu, select <strong>Search</strong> | <strong>Replace…</strong>; then fill in:</p>
<p dir="auto"><strong>Find what: <code>\t(?=[^\r\n"]*+"[^\r\n"]*+[\r\n])</code></strong><br />
<strong>Replace with:</strong> <em>(a single space)</em><br />
<strong>Search Mode: Regular expression</strong></p>
<p dir="auto">then click <strong>Replace All</strong>.</p>
<p dir="auto">This assumes that each line in your text either has no double quote marks or has two double quote marks. If there are other cases (such as lines with two quoted strings, or quoted strings that span lines) this will not work.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/93941</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/93941</guid><dc:creator><![CDATA[Coises]]></dc:creator><pubDate>Mon, 01 Apr 2024 06:26:23 GMT</pubDate></item></channel></rss>