-1

I have a large file with wrapped lines:

 0              
  0.000    1.1    2.2   3.3  4.4    5.5    6.6    7.7  
  8.8   9.9    10.10    11.11

5
0.000 1.1 2.2 3.3 4.4 5.5 6.6 7.7
8.8 9.9 10.10 11.11

I would like to convert each record in a single line, like this:

0                0.000    1.1    2.2   3.3  4.4    5.5    6.6    7.7    8.8   9.9    10.10    11.11

5 0.000 1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 10.10 11.11

Each 3 lines downforward in the file

Someone can help me?

Destroy666
  • 12,350
Julio
  • 1

2 Answers2

0

You can do a find for (with Serach Mode: Regular expression selected):

(.*)\r\n(.*)\r\n(.*\r\n)(.*\r\n)

And replace with:

\1\2\3\4

Press Replace All.

This will cut out the 1st and 2nd line breaks (leaving the 3 lines together) and then leave in place the next two (the empty line and the start of a new record.

enter image description here

Yisroel Tech
  • 13,220
0

This removes all linebreak when not followed by another linebreak.

  • Ctrl+H
  • Find what: \R(?!\R)
  • Replace with: `LEAVE EMPTY
  • TICK Wrap around
  • SELECT Regular expression
  • Replace all

Explanation:

\R          # any kind of linebreak
(?!\R)      # negative lookahead, make sure we haven't a linebreak after

Screenshot (before):

enter image description here

Screenshot (after):

enter image description here

Toto
  • 19,304