Page 1 of 1

Complex replacing

Posted: Fri Feb 25, 2011 5:53 pm
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.

Posted: Sat Feb 26, 2011 12:42 pm
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.

Posted: Mon Feb 28, 2011 2:45 pm
by Siaruzb
Find what: ^([0-9]+)"_
Replace with: \1_"

These are works better. Thank you very much Ak47wong.