S
Suzie Wilks
This seems so simple, but it's driving me crazy.
I have a file that looks a bit like this:
-0.15 -0.15 -0.20
-0.20 -0.20 -0.15
-0.15 -0.15 -0.15
0.002
0.007
0.038
But I'd like it to be:
-0.15 -0.15 -0.20
-0.20 -0.20 -0.15
-0.15 -0.15 -0.15
0.002 0.007 0.038
(Empty lines between lines are ok. ) I guess I'm supposed to get rid
of a newline if the next line starts with whitespace, but my regexps
just aren't doing it. (Or get rid of a newline if it's followed by
whitespace?)
Any thoughts?
Thanks very much!
I have a file that looks a bit like this:
-0.15 -0.15 -0.20
-0.20 -0.20 -0.15
-0.15 -0.15 -0.15
0.002
0.007
0.038
But I'd like it to be:
-0.15 -0.15 -0.20
-0.20 -0.20 -0.15
-0.15 -0.15 -0.15
0.002 0.007 0.038
(Empty lines between lines are ok. ) I guess I'm supposed to get rid
of a newline if the next line starts with whitespace, but my regexps
just aren't doing it. (Or get rid of a newline if it's followed by
whitespace?)
Any thoughts?
Thanks very much!