doubling text

General questions about using TextPad

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

Post Reply
f000ker
Posts: 16
Joined: Mon Jan 10, 2005 11:43 pm

doubling text

Post by f000ker »

say i got
word
word1
word2
word3

how make it output
wordword
word1word1
word2word2
word3word3

?
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Using regular expressions:

find .*
replace &&

short and sweet IMHO. Not sure if using the "&" is a "proper" regex so here is another version:

find ^(.*)$
replace \1\1

I have used POSIX regular expression syntax, which can be selected from the Editor page of the Preferences dialog box. Hope this helps.
Then I open up and see
the person fumbling here is me
a different way to be
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Or even:
replace .*
with \0\0
Post Reply