<?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 character with multiple spaces]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">can someone tell me, where my brain has decided to go on holiday regarding the replacment regex in notepad serach/replace</p>
<p dir="auto">i have a string ex. “ad” and i want to replce that string with a number of spaces say 20.</p>
<p dir="auto">my idea:<br />
<img src="/assets/uploads/files/1685454854377-c30ba6b8-4499-48b4-95f9-8b8601346434-image.png" alt="c30ba6b8-4499-48b4-95f9-8b8601346434-image.png" class=" img-fluid img-markdown" /> .</p>
<p dir="auto">my result:<br />
<img src="/assets/uploads/files/1685455018620-019d0db5-6a66-42c9-9d19-0596f21050d9-image.png" alt="019d0db5-6a66-42c9-9d19-0596f21050d9-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">I have found nothing so far that says this should not work.</p>
<p dir="auto">I’d be glad for any news even if it’s just, that np++ does not work like that ;)</p>
<p dir="auto">P.S.:  Notepad Version V 8.4.8 64bit</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/24508/replace-character-with-multiple-spaces</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 06:54:14 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/24508.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 30 May 2023 13:59:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to replace character with multiple spaces on Tue, 30 May 2023 23:59:38 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/black_cat" aria-label="Profile: black_cat">@<bdi>black_cat</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/mark-olson" aria-label="Profile: mark-olson">@<bdi>mark-olson</bdi></a>, <a class="plugin-mentions-user plugin-mentions-a" href="/user/wonkawilly" aria-label="Profile: wonkawilly">@<bdi>wonkawilly</bdi></a> and <strong>All</strong>,</p>
<p dir="auto">And here is on <strong>other</strong> way to achieve your goal, <a class="plugin-mentions-user plugin-mentions-a" href="/user/black_cat" aria-label="Profile: black_cat">@<bdi>black_cat</bdi></a> !</p>
<hr />
<ul>
<li>In your <strong>current</strong> working tab or in a <strong>new</strong> tab, type in the following string, on a <strong>new</strong> line</li>
</ul>
<pre><code class="language-diff">(                    )
</code></pre>
<ul>
<li>
<p dir="auto">To verify if you get the <strong>right</strong> number of spaces, just <strong>double</strong>-click inside the parentheses <strong>gap</strong></p>
</li>
<li>
<p dir="auto"><strong>Select</strong> all this line, with the <strong>two</strong> parentheses</p>
</li>
<li>
<p dir="auto">Hit the <strong><code>Ctrl + H</code></strong> shortcut ( <strong>Replace</strong> dialog )</p>
</li>
</ul>
<p dir="auto">=&gt; The <strong>Find what:</strong> zone should be <strong>populated</strong> with that string</p>
<ul>
<li><strong>Click</strong> on the <strong>small</strong> button, with the <strong>two</strong> <strong><code>UP</code></strong> and <strong><code>DOWN</code></strong> arrows, close to the <strong>Find</strong> and <strong>Replace</strong> zones</li>
</ul>
<pre><code class="language-diff">=&gt; The (                    ) string should have moved to the REPLACE zone !
</code></pre>
<ul>
<li>
<p dir="auto">Then, type in <strong><code>ad</code></strong> in the <strong>Find what:</strong> zone</p>
</li>
<li>
<p dir="auto">Select the <strong><code>Regular expression</code></strong> search <strong>mode</strong>    ( <em>IMPORTANT</em> )</p>
</li>
</ul>
<p dir="auto">And… enjoy ;-))</p>
<hr />
<p dir="auto">In the <strong>replacement</strong> part, you may, as well, use a <strong>composite</strong> text like, for instance :</p>
<pre><code class="language-diff">(   This is                    a test !   )
</code></pre>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86694</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86694</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Tue, 30 May 2023 23:59:38 GMT</pubDate></item><item><title><![CDATA[Reply to replace character with multiple spaces on Tue, 30 May 2023 20:31:52 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/black_cat" aria-label="Profile: black_cat">@<bdi>black_cat</bdi></a><br />
I’m afraid that the Npp Search and Replace dialog can’t use the regex you typed into the Replace textbox but only into the Search textbox.</p>
<p dir="auto">This is because in case of using regex, the <strong>replace</strong> part of the Find and Replace function is interpreted in a different manner than the <strong>find</strong> part: the {20} part is in fact interpreted literally, as a normal text string.</p>
<p dir="auto">But a possible solution is to use <strong>Python script</strong> (you must have already installed the relative plugin) than you have to open its console and type the following command into its command line;</p>
<pre><code>editor.rereplace('ad', ' ' * 20)
</code></pre>
<p dir="auto">that instruct Python to fined “ad” and replace it with 20 spaces. Than hit run. You should obtain your wished result.</p>
<p dir="auto">Another valid alternative of course is to actually type 20 spaces into the Replace textbox.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86679</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86679</guid><dc:creator><![CDATA[wonkawilly]]></dc:creator><pubDate>Tue, 30 May 2023 20:31:52 GMT</pubDate></item><item><title><![CDATA[Reply to replace character with multiple spaces on Tue, 30 May 2023 14:42:24 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/black_cat" aria-label="Profile: black_cat">@<bdi>black_cat</bdi></a></p>
<p dir="auto">If you want to implement your own replacement syntax, you can do so with scripting; some hints are in the FAQ <a href="https://community.notepad-plus-plus.org/topic/23170/faq-desk-can-i-do-a-mathematical-replacement">HERE</a>.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86660</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86660</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 30 May 2023 14:42:24 GMT</pubDate></item><item><title><![CDATA[Reply to replace character with multiple spaces on Tue, 30 May 2023 14:32:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/black_cat" aria-label="Profile: black_cat">@<bdi>black_cat</bdi></a><br />
It is possible, just not the way you thought. see my first response.</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86658</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86658</guid><dc:creator><![CDATA[Mark Olson]]></dc:creator><pubDate>Tue, 30 May 2023 14:32:54 GMT</pubDate></item><item><title><![CDATA[Reply to replace character with multiple spaces on Tue, 30 May 2023 14:21:14 GMT]]></title><description><![CDATA[<p dir="auto">Thanke you guys for the info, now I at least know that it’s just not possible.</p>
<p dir="auto">Has anyone a workaround or an alternitive?</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86657</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86657</guid><dc:creator><![CDATA[black_cat]]></dc:creator><pubDate>Tue, 30 May 2023 14:21:14 GMT</pubDate></item><item><title><![CDATA[Reply to replace character with multiple spaces on Tue, 30 May 2023 14:07:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/black_cat" aria-label="Profile: black_cat">@<bdi>black_cat</bdi></a><br />
Consult the <a href="https://npp-user-manual.org/docs/searching/" rel="nofollow ugc">regex documentation</a>.</p>
<p dir="auto">The basic issue is that while there is special syntax for replacements, it is different from the searching syntax. This is true of all regex engines For example, <code>\x20{20}</code> (I used <code>\x20</code> for the space character) matches 20 spaces when searching, but the only way to insert 20 spaces in a replacement is <code>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20</code></p>
]]></description><link>https://community.notepad-plus-plus.org/post/86656</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86656</guid><dc:creator><![CDATA[Mark Olson]]></dc:creator><pubDate>Tue, 30 May 2023 14:07:42 GMT</pubDate></item><item><title><![CDATA[Reply to replace character with multiple spaces on Tue, 30 May 2023 14:05:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/black_cat" aria-label="Profile: black_cat">@<bdi>black_cat</bdi></a> said in <a href="/post/86653">replace character with multiple spaces</a>:</p>
<blockquote>
<p dir="auto">I’d be glad for any news even if it’s just, that np++ does not work like that ;)</p>
</blockquote>
<p dir="auto">np++ does not work like that</p>
]]></description><link>https://community.notepad-plus-plus.org/post/86655</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/86655</guid><dc:creator><![CDATA[Alan Kilborn]]></dc:creator><pubDate>Tue, 30 May 2023 14:05:59 GMT</pubDate></item></channel></rss>