<?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[how to copy into multiple line into their orig line]]></title><description><![CDATA[<p dir="auto">I am trying to make a simple move script and it involve hundred of files<br />
how can I copy content into their original line<br />
Example<br />
1.txt<br />
2.txt<br />
3.txt<br />
into this<br />
1.txt 1.txt<br />
2.txt 2.txt<br />
3.txt 3.txt</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/15299/how-to-copy-into-multiple-line-into-their-orig-line</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Mar 2026 02:58:25 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/15299.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Feb 2018 08:46:38 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to how to copy into multiple line into their orig line on Wed, 21 Feb 2018 09:46:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/195">@guy038</a> thanks<br />
you got upvoted</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30460</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30460</guid><dc:creator><![CDATA[FujiyamaVolcano]]></dc:creator><pubDate>Wed, 21 Feb 2018 09:46:01 GMT</pubDate></item><item><title><![CDATA[Reply to how to copy into multiple line into their orig line on Wed, 21 Feb 2018 09:27:10 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="https://community.notepad-plus-plus.org/uid/11296">@fujiyamavolcano</a>, and <strong>All</strong>,</p>
<p dir="auto">Very <strong>easily</strong>, indeed ! No need for a <strong>script</strong> language to achieve that simple task. Just use a <strong>regular</strong> expression search/replacement.</p>
<ul>
<li>
<p dir="auto">Open the <strong>Replace</strong> dialog</p>
</li>
<li>
<p dir="auto">Type in <strong><code>(?-s)^.+</code></strong> in the <strong>Find what:</strong> zone</p>
</li>
<li>
<p dir="auto">Type in <strong><code>$0\x20$0</code></strong> in the <strong>Replace with:</strong> zone</p>
</li>
<li>
<p dir="auto">Select the <strong><code>wrap around</code></strong> ( or the <strong><code>In selection</code></strong> option if you <strong>restrict</strong> replacement to a <strong>previous</strong> selection )</p>
</li>
<li>
<p dir="auto">Click on the <strong>Replace All</strong> option</p>
</li>
</ul>
<p dir="auto">That regex replaces <strong>any</strong> text, of a line, with <strong>two copies</strong> of that text, separated by a <strong>space</strong> character, in the <strong>same</strong> line !</p>
<p dir="auto">So, from the initial text :</p>
<pre><code class="language-diff">This is
a test
12345
1.txt
2.txt
3.txt
*--*
</code></pre>
<p dir="auto">You obtain, <strong>after</strong> replacement,</p>
<pre><code class="language-diff">This is This is
a test a test
12345 12345
1.txt 1.txt
2.txt 2.txt
3.txt 3.txt
*--* *--*
</code></pre>
<p dir="auto"><strong>Notes</strong> :</p>
<ul>
<li>
<p dir="auto">The <strong><code>(?-s) </code></strong> <strong>modifier</strong> ensures that the special <strong><code>.</code></strong> character will match a single <strong>standard</strong> character, only, and not the <strong>End of Line</strong> characters</p>
</li>
<li>
<p dir="auto">Then, the part <strong><code>.+</code></strong> represents any <strong>non-empty</strong> range of <strong>standard</strong> characters , of each line, starting at <strong>beginning</strong> of line ( <strong><code>^</code></strong> )</p>
</li>
<li>
<p dir="auto">In <strong>replacement</strong>, we rewrite the <strong>overall</strong> match ( <strong><code>$0</code></strong> ), followed with a <strong>space</strong> character ( <strong><code>\x20</code></strong> ), and, finally, followed again with the <strong>overall</strong> match  ( <strong><code>$0</code></strong> )</p>
</li>
</ul>
<p dir="auto"><strong>Remarks</strong> :</p>
<ul>
<li>
<p dir="auto">In <strong>replacement</strong>, you may insert a simple <strong>space</strong> character ( or more, if necessary ) , instead of the <strong><code>\x20</code></strong> syntax</p>
</li>
<li>
<p dir="auto">You may, also, write <strong>multiple copies</strong>, of each <strong>initial</strong> line, in the <strong>same</strong> line. For instance, with the <strong>initial</strong> text, above, the regex S/R :</p>
</li>
</ul>
<p dir="auto">SEARCH <strong><code>(?-s)^.+</code></strong></p>
<p dir="auto">REPLACE <strong><code>Line repeated 3 times : | $0 | $0 | $0 |</code></strong></p>
<p dir="auto">would product the following test :</p>
<pre><code class="language-diff">Line repeated 3 times : | This is | This is | This is |
Line repeated 3 times : | a test | a test | a test |
Line repeated 3 times : | 12345 | 12345 | 12345 |
Line repeated 3 times : | 1.txt | 1.txt | 1.txt |
Line repeated 3 times : | 2.txt | 2.txt | 2.txt |
Line repeated 3 times : | 3.txt | 3.txt | 3.txt |
Line repeated 3 times : | *--* | *--* | *--* |
</code></pre>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/30459</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/30459</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Wed, 21 Feb 2018 09:27:10 GMT</pubDate></item></channel></rss>