regexp BUG in multiple GUI text editing programs
Hi all,
I'm writing to you all together because you all suffer from the same
regexp bug. I suspect it could be caused by a library you all share? I
have only found that (X)Emacs doesn't suffer from it.
If you create a new file with these tags:
<test><test2>
Try and replace the tags with "hello" (no quotes) using this regexp:
<.*?>
[The "?" is supposed to make the any character matching non-greedy].
Here's what happens in various packages:
Bluefish pre0.7 HTML editor:
The whole of <test><test2> is incorrectly selected.
Kate 1.0 (using KDE 2.2):
The whole of <test><test2> is incorrectly selected.
gnp (gnotepad+ 1.3.1):
0 replacements found.
nedit version 5.1.1:
Very weird. If I replace the above string with "hello" (no quotes) the
output becomes:
hello<hello>hello<hello>
In all cases the end result should be:
hellohello
Only XEmacs is capable of generating the correct answer. I'm running an
up-to-date version of Debian unstable on x86.
I'm pretty new to regular expressions so I hope I haven't made an
elementary mistake (but I have XEmacs as my comparison :-)
I'm only subscribed to debian-user and debian-devel. Please only follow
up to the relevant groups or individuals.
Regards,
Adam
Reply to: