Delete any other new line

I have a list of data in text format that looks like this

Name1 Name2

location job date amount

Name1 Name2

location job date amount

Name1 Name2

location job date amount

I need to somehow do this in

Name1 Name2 location job date amount

...

I suppose there should be a way to capture every new line with regex or excel. I could write a python script, but this file was sick and hoped there would be an easier way to do this.

EDIT: adding what I tried below:

Sorry, I had to include some code ... I tried

([^\n]*\n)[^\n]*\n 

in regex, but this groups two lines together, I basically would like to capture only a new line between the groups. I also tried to do this in excel systematically, but it does not continue to capture every other cell when I drag the window. It changes every cell in the column to every cell when I try to extrude it.

+4
1

.Net regex ( VBA, ), :

Pattern = "([^\n]*)(\n)([^\n]*(\n|\z))"
Replacement = "$1$3"

, NewLine , .

, .

+3

All Articles