General questions about using TextPad
Moderators: AmigoJack , bbadmin , helios , MudGuard
andrea_baffo
Posts: 2 Joined: Thu Oct 06, 2011 10:32 am
Post
by andrea_baffo » Thu Oct 06, 2011 11:55 am
Hi! I have to append multiple lines but these are not consecutive.
BEFORE
AAAA BBBB
1111 11111
2222 22222
5555 55555
AFTER
AAAA BBBB 2222 2222
1111 1111 5555 5555
Thank you so much!!
ben_josephs
Posts: 2464 Joined: Sun Mar 02, 2003 9:22 pm
Post
by ben_josephs » Thu Oct 06, 2011 1:23 pm
Use "Posix" regular expression syntax:
C onfigure | P references | Editor
[X ] Use P OSIX regular expression syntax
S earch | R eplace... (
<F8> ):
Fi nd what: (.*)\n(.*)\n(.*)\n(.*)
Rep lace with: \1 \3\n\2 \4
[X ] Regular e xpression
Replace A ll
andrea_baffo
Posts: 2 Joined: Thu Oct 06, 2011 10:32 am
Post
by andrea_baffo » Thu Oct 06, 2011 2:36 pm
Thank you so much, It works, you're the best!
And what about if I have three linee to concatenate
BEFORE
First
Fourth
Seventh
Second
Fifth
Eighth
Third
Sixth
Ninth
AFTER
First Second third
Fourth Fifth Sixth
Seventh Eighth ninth
Really Thank you for your time!
ben_josephs
Posts: 2464 Joined: Sun Mar 02, 2003 9:22 pm
Post
by ben_josephs » Thu Oct 06, 2011 2:53 pm
You could have worked this out yourself.
Fi nd what: (.*)\n(.*)\n(.*)\n(.*)\n(.*)\n(.*)\n(.*)\n(.*)\n(.*)
Rep lace with: \1 \4 \7\n\2 \5 \8\n\3 \6 \9
[X ] Regular e xpression
Replace A ll
It won't work beyond
\9 in TextPad.