Notepad++ changing written format of text

143 views Asked by At

Hey guys I have a bunch of information on one notepad but its all jumbled up and I was hoping you guys could help me put it together and make it in the form of:

a,b,c,d
a,b,c,d

Where a,b,c,d can be variables such as name,fav food,skin colour,hair colour. OR something along those lines.

Right now these variables are in the form of:

a

b
<SP>
c
<SP>
d
<SP>

<SP>
a (and this is where it starts again in the same format)

The <SP>'s stand for a space, i didn't know how else to annotate them it just comes up as a empty line with a space...

Is there any way of converting this into the other format?

1

There are 1 answers

10
nl-x On

In notepad++ go to Replace, and set it to Extended mode.

  • First replace \n \n (there is a whitespace in the middle!) with , to replace all lines with just a space into commas on the same line.
  • Then replace \n\n with \n to remove the empty lines that are left.
  • And replace \n,' with\n` to remove all leading commas.
  • Lastly replace ,\n with \n to remove all trailing commas