Apply clip to multiple lines

General questions about using TextPad

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

Post Reply
mdvdlone
Posts: 2
Joined: Fri May 13, 2011 6:50 pm

Apply clip to multiple lines

Post by mdvdlone »

I have three lines:

one
two
three

I have a clip that can be applied to each line so after each selection and double clicking on the clip, I get the following:

my $one;
my $two;
my $three;

However, if I select all three lines and apply the clip, I get the following:

my $one
two
three;

Make sense since the clip is defined as

my $\^; where \^ applies to the selection.

What I would like happen is selecting all three lines and then applying either a clip or macro to convert all three lines in a single click or keystroke to

my $one;
my $two;
my $three;

Any suggestions/recommendations are much appreciated.

Cheers.
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Search | Replace... (<F8>):
Find what: .*
Replace with: my $\0;

[X] Regular expression

Replace All
mdvdlone
Posts: 2
Joined: Fri May 13, 2011 6:50 pm

Post by mdvdlone »

ben_josephs wrote:Search | Replace... (<F8>):
Find what: .*
Replace with: my $\0;

[X] Regular expression

Replace All
Worked like a charm.
I just created a Macro for it.

Thanks for your prompt response.

Cheers.
Post Reply