replace in multiple lines from one word no anoher

General questions about using TextPad

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

Post Reply
tengounamigo
Posts: 5
Joined: Fri Jun 11, 2010 7:13 am

replace in multiple lines from one word no anoher

Post by tengounamigo »

Hello! I am looking the forum for some hours, but I can't find the solution.. sorry

please how I can select from NAME to SUBJECT: and replace ????

NAME sssss
dlkfkfldsklfkdslfkldsf
dlkfdslkfldskfldsklfkdslfkldskfls
SUBJECT:


Thank you veru much
ben_josephs
Posts: 2459
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Is the number of lines between the NAME and SUBJECT lines always the same?

If so, use something like:
^NAME .*\n.*\n.*\nSUBJECT:

If the number of lines to be matched is not always the same it can be done in TextPad, but it's not as easy as it should be and cannot be done with a single regular expression replacement, as TextPad's regex engine provides no way to match an arbitrary number of newlines. Other tools, such as WidlEdit (http://www.textpad.com/products/wildedit/) use more modern and powerful regex engines that do not suffer from this restriction.

You haven't said which part of the matched text you want to replace and what you want to replace it with.
tengounamigo
Posts: 5
Joined: Fri Jun 11, 2010 7:13 am

Post by tengounamigo »

perfect! it work for me :)

thank you very much
Post Reply