Hello, @xerkon,
As you said :
I’d like to be able to copy 2 columns from a spreadsheet
I suppose that your selected bloc of cells ( 6 rows x 2 columns ), pasted in a new tab, within N++, is displayed, as below, where any number of the second column is simply separated, from its associated number of the first column, by a tabulation character ( \t ) !
1.25 0.25 2.5 0.5 3.25 1.25 4.5 1.5 5.25 2.25 6.5 2.75If so, the simple regex S/R should do the job :
SEARCH (?-s)^(.+?)\t(.+)
REPLACE <controlpoint t="\1" val="\2"/> , with a space character, before the string val
OPTIONS Wrap around and Regular expression set
And you’ll get the text :
<controlpoint t="1.25" val="0.25"/> <controlpoint t="2.5" val="0.5"/> <controlpoint t="3.25" val="1.25"/> <controlpoint t="4.5" val="1.5"/> <controlpoint t="5.25" val="2.25"/> <controlpoint t="6.5" val="2.75"/>If you prefer separate the two values by a tabulation character, just change the Replace box, as belwo :
REPLACE <controlpoint t="\1"\tval="\2"/>
This time, you would obtain :
<controlpoint t="1.25" val="0.25"/> <controlpoint t="2.5" val="0.5"/> <controlpoint t="3.25" val="1.25"/> <controlpoint t="4.5" val="1.5"/> <controlpoint t="5.25" val="2.25"/> <controlpoint t="6.5" val="2.75"/>Best Regards,
guy038