<?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[Replacing a column of numbers with clipboard data]]></title><description><![CDATA[<p dir="auto">Hi.  I have a 2 columns of values that I’d like to replace.  Let me show an example:</p>
<p dir="auto">&lt;controlpoint t=“<em>0.46</em>” val=“<em>1.0</em>”/&gt;<br />
&lt;controlpoint t=“<em>8.21</em>” val=“<em>0.9</em>”/&gt;<br />
&lt;controlpoint t=“<em>12.32</em>” val=“<em>1.02</em>”/&gt;<br />
&lt;controlpoint t=“<em>20.94</em>” val=“<em>0.95</em>”/&gt;<br />
&lt;controlpoint t=“<em>29.27</em>” val=“<em>1.09</em>”/&gt;<br />
&lt;controlpoint t=“<em>40.01</em>” val=“<em>0.958</em>”/&gt;</p>
<p dir="auto">I’m needing to replace everything that is italicized.  (If I have to do it a column at a time, that’s okay.)  I’d like to be able to copy 2 columns from a spreadsheet and replace all values.  So if I have a column with:<br />
1.25<br />
2.5<br />
3.25<br />
4.5<br />
5.25<br />
6.5<br />
and a second column:<br />
0.25<br />
0.5<br />
1.25<br />
1.5<br />
2.25<br />
2.75<br />
is there a way to copy to clipboard and then paste into Notepad++ with the result being:<br />
&lt;controlpoint t=“<em>1.25</em>” val=“<em>0.25</em>”/&gt;<br />
&lt;controlpoint t=“<em>2.5</em>” val=“<em>0.5</em>”/&gt;<br />
&lt;controlpoint t=“<em>3.25</em>” val=“<em>1.25</em>”/&gt;<br />
&lt;controlpoint t=“<em>4.5</em>” val=“<em>1.5</em>”/&gt;<br />
&lt;controlpoint t=“<em>5.25</em>” val=“<em>2.25</em>”/&gt;<br />
&lt;controlpoint t=“<em>6.5</em>” val=“<em>2.75</em>”/&gt;<br />
?<br />
Thanks!</p>
]]></description><link>https://community.notepad-plus-plus.org/topic/14830/replacing-a-column-of-numbers-with-clipboard-data</link><generator>RSS for Node</generator><lastBuildDate>Tue, 19 May 2026 12:24:54 GMT</lastBuildDate><atom:link href="https://community.notepad-plus-plus.org/topic/14830.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 25 Nov 2017 20:10:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Replacing a column of numbers with clipboard data on Sun, 26 Nov 2017 10:26:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello, <a class="plugin-mentions-user plugin-mentions-a" href="/user/xerkon" aria-label="Profile: xerkon">@<bdi>xerkon</bdi></a>,</p>
<p dir="auto">As you said :</p>
<blockquote>
<p dir="auto">I’d like to be able to copy 2 columns from a spreadsheet</p>
</blockquote>
<p dir="auto">I suppose that your <strong>selected bloc</strong> of cells ( <strong><code>6</code></strong> rows x <strong><code>2</code></strong> columns ), pasted in  a <strong>new</strong> tab, within N++, is displayed, as below, where any number of the <strong>second</strong> column is simply <strong>separated</strong>, from its <strong>associated</strong> number of the <strong>first</strong> column, by a <strong>tabulation</strong> character   ( <strong><code>\t</code></strong> ) !</p>
<pre><code class="language-diff">1.25	0.25
2.5	0.5
3.25	1.25
4.5	1.5
5.25	2.25
6.5	2.75
</code></pre>
<p dir="auto">If so, the simple regex S/R should do the job :</p>
<p dir="auto">SEARCH <strong><code>(?-s)^(.+?)\t(.+)</code></strong></p>
<p dir="auto">REPLACE <strong><code>&lt;controlpoint t="\1" val="\2"/&gt;</code></strong> , with a <strong>space</strong> character, <strong>before</strong> the string <strong>val</strong></p>
<p dir="auto">OPTIONS <strong><code>Wrap around</code></strong> and <strong><code>Regular expression</code></strong> <strong>set</strong></p>
<p dir="auto">And you’ll get the text :</p>
<pre><code class="language-diff">&lt;controlpoint t="1.25" val="0.25"/&gt;
&lt;controlpoint t="2.5" val="0.5"/&gt;
&lt;controlpoint t="3.25" val="1.25"/&gt;
&lt;controlpoint t="4.5" val="1.5"/&gt;
&lt;controlpoint t="5.25" val="2.25"/&gt;
&lt;controlpoint t="6.5" val="2.75"/&gt;
</code></pre>
<p dir="auto">If you prefer separate the <strong>two</strong> values by a <strong>tabulation</strong> character, just change the <strong>Replace</strong> box, as belwo :</p>
<p dir="auto">REPLACE <strong><code>&lt;controlpoint t="\1"\tval="\2"/&gt;</code></strong></p>
<p dir="auto">This time, you would obtain :</p>
<pre><code class="language-diff">&lt;controlpoint t="1.25"	val="0.25"/&gt;
&lt;controlpoint t="2.5"	val="0.5"/&gt;
&lt;controlpoint t="3.25"	val="1.25"/&gt;
&lt;controlpoint t="4.5"	val="1.5"/&gt;
&lt;controlpoint t="5.25"	val="2.25"/&gt;
&lt;controlpoint t="6.5"	val="2.75"/&gt;
</code></pre>
<p dir="auto">Best Regards,</p>
<p dir="auto">guy038</p>
]]></description><link>https://community.notepad-plus-plus.org/post/28260</link><guid isPermaLink="true">https://community.notepad-plus-plus.org/post/28260</guid><dc:creator><![CDATA[guy038]]></dc:creator><pubDate>Sun, 26 Nov 2017 10:26:19 GMT</pubDate></item></channel></rss>