Transpose?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
gcotterl
Posts: 248
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Transpose?

Post by gcotterl »

My data looks like this:

name
address
city
state
zip

name
address
city
state
zip

name
address
city
state
zip

name
address
city
state
zip

============================================

How can I get the data in each block onto the same line so the result looks like this:

name address city state zip
name address city state zip
name address city state zip
name address city state zip
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Search | Replace... (<F8>):
Find what: (.*)\r(.*)\r(.*)\r(.*)\r(.*)\r\r
Replace with: $1 $2 $3 $4 $5\r

[X] Regular expression

Replace All
gcotterl
Posts: 248
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

Thank you!!!
User avatar
jeffy
Posts: 323
Joined: Mon Mar 03, 2003 9:04 am
Location: Philadelphia

Post by jeffy »

If it's that strictly formatted, a macro would work as well. Just record and run with word-wrap off.
Post Reply