Find and Replace problem with 4.4

General questions about using TextPad

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

Post Reply
Eric Beaudoin

Find and Replace problem with 4.4

Post by Eric Beaudoin »

Hi,

I've just upgrade to 4.4 and I realised that one of the macro that was working with 4.31 is not working any longer. The macro is Continue comment. I've downloaded it from the add-on section on the Textpad site.

The macro use a search and replace with the following regular expression :

^\([\t ]*\)\([^ \t]*\)\([\t ]*\)\(.*\)$

to be replaced with

\0\n\1\2\3

When I try it with 4.4, an empty line (\n) followed by "\1\2\3" is inserted in front of the current line instead of what replacing what was found.

Does anyone have a clue? Did the regular expression changed?

Thanks
Andreas

RE: Find and Replace problem with 4.4

Post by Andreas »

Hi,
you can always use & instead of \0
The help still says that \0 is equivalent to &

We had another thread a few days ago (Find string same as orginal tagged expression) where a \n in a regex caused some trouble.
What happens if you replace the \n with something else?

Andreas
Eric Beaudoin

RE: Find and Replace problem with 4.4

Post by Eric Beaudoin »

I tried with a space instead of the \n and add the following result (without the "):

" \1\2\3"

i.e. the same result as before except that I do not have a new-line before the \1\2\3 string.

I also tried using & instead of \0 and get exactly the same result.

I had a 4.3 and 4.31 version lying around so I tried agin with these and the macro works. It stop working when I put 4.4 on the same machine. Maybe it's an upgrade problem? Maybe there's a bug in the regex of 4.4?

Any idea?
Post Reply