Complex replacing

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
Siaruzb
Posts: 20
Joined: Thu Jul 27, 2006 6:02 pm

Complex replacing

Post by Siaruzb »

Hello everyone,

I have following blocks:

10" wording 1"
11" wording 2"
12" wording 3"

10" wording 4"
11" wording 5"
12" wording 6"
...

I need to replace them with...

10 "wording 1"
11 "wording 2"
12 "wording 3"

10 "wording 4"
11 "wording 5"
12 "wording 6"
...

I know how to find and replace each row one by one. But can I do that by blocks, like to select one block and replace with another one (here _ is just space):

10"_
11"_
12"_

10 "
11 "
12 "

Thanks.
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post by ak47wong »

It seems to me that you can simply find "_ and replace with _" where _ represents a space.

If you need to be more specific with your find string, you can do a replace as follows:

Find what: ^([0-9]+)"_
Replace with: \1_"

Replace the underscores with spaces.
Select the Regular expression check box.

This assumes you are using POSIX regular expression syntax in Configure > Preferences > Editor.
Siaruzb
Posts: 20
Joined: Thu Jul 27, 2006 6:02 pm

Post by Siaruzb »

Find what: ^([0-9]+)"_
Replace with: \1_"

These are works better. Thank you very much Ak47wong.
Post Reply