Can I Replace lines of text?

General questions about using TextPad

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

Post Reply
drslim
Posts: 5
Joined: Wed Sep 24, 2003 3:48 pm

Can I Replace lines of text?

Post by drslim »

Is it possible to replace lines of text eg. how can I replace the 3 lines below with the new text ??

This is line 1 of old text.
This is line 2 of old text.
This is line 3 of old text.

(Below is the new text to replace the 3 lines of text above)
This is line 1 of NEW text.
This is line 2 of NEW text.
This is line 3 of NEW text.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Using Posix for regular expressions:
Find "This is line ([0-9]+) of old text."
Replace "This is line \1 of NEW text."
w/o the quotes.
Then I open up and see
the person fumbling here is me
a different way to be
drslim
Posts: 5
Joined: Wed Sep 24, 2003 3:48 pm

Post by drslim »

Sorry, I have made the example too simple.

How can I replace say...

This week payments are due.
Incomes have risen and this bonuses are due.

(replace it with)

Every cat & dog will get more food.
Tuna & shrimp to be weighed out.
Dinner is at 6 pm.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

The linebreaks you're after? Use "\n".
Then I open up and see
the person fumbling here is me
a different way to be
Post Reply