Repeating text

General questions about using TextPad

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

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

Repeating text

Post by gcotterl »

My file contains:

AAAAAAAA 123456
............... 234567
............... 498586
............... 493848
............... 502010
............... 997384
BBBBBBBB 503000
............... 604060
............... 102030
................ 000230
CCCCCCCC 121212
............... 999940
............... 503054
................ 506660

(the dots are really spaces).

How can I carry the first 8 characters down onto subsequent rows so the result is:


AAAAAAAA 123456
AAAAAAAA 234567
AAAAAAAA 498586
AAAAAAAA 493848
AAAAAAAA 502010
AAAAAAAA 997384
BBBBBBBB 503000
BBBBBBBB 604060
BBBBBBBB 102030
BBBBBBBB 000230
CCCCCCCC 121212
CCCCCCCC 999940
CCCCCCCC 503054
CCCCCCCC 506660
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Find what: ^([^_].{7})_(.*)\n_+ [Replace the underscores with spaces]
Replace with: $1_$2\n$1_ [Replace the underscores with spaces]

[X] Regular expression

Replace All -- do this repeatedly until it beeps
gcotterl
Posts: 252
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

Wow! That worked!! Thanks muchly!!!
Post Reply