1

I have multiple (+/- 2500) repeating rows in one column that I need to convert to a fixed set of columns which matches the repetition of the rows i.e. ABCDE-ABCDE, do my editing in column mode, then convert back to rows. This is an abridged example of my data:

A
B
C
D
E
A
B
C
D
E    

I would like it to be like this:

A   B   C   D   E
A   B   C   D   E

Then convert back to rows.

Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563
DBHarper
  • 11
  • 2

1 Answers1

1

After your edit, the answer is easy: you need to capture 5 subsequent lines and replace linebreaks between them with a tab character.

Find what: ^(.+)\R+(.+)\R+(.+)\R+(.+)\R+(.+)
Replace with: $1\t$2\t$3\t$4\t$5

Where ^ matches the line start, (.+) matches and captures into a Group a non-empty line (replace + with * if empty lines are to be considered), \R+ matches 1 or more line breaks (be it a CRLF, CR or LF sequences).

In the replacement pattern, $n are backreferences to the corresponding group captured value.

enter image description here

Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563