-1

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
  • So before the first a there is no <SP> ? And between the first a and b there is also no <SP> ?
    – nl-x
    May 29, 2014 at 20:19

1 Answer 1

0

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
10
  • sorry that first bit didnt work at the bottom it says Replace All:0 May 29, 2014 at 20:51
  • @user3689025 well, I was assuming you had mistakes in your OP, but you replied 'yes exactly that'. So tell me, what is it that makes you know when to start a new line ?
    – nl-x
    May 29, 2014 at 21:00
  • sorry could you please rephrase that? but the example ive shown is exactly how the format is... do you want me to upload the file to show you how the format is? please just show me where to upload it May 29, 2014 at 21:04
  • @user3689025 well, if between the first a and b there is no <SP>, then how do you know a and b belong on the same line?
    – nl-x
    May 29, 2014 at 21:09
  • they dont belong on the same line? its a new paragraph. May 29, 2014 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.