On Mon, 22 Feb 1999, Daniel Naber wrote:
> here's a patch that extends the search+replace stuff with regular
> expressions. It's paragraph based, that means forward searching for .*
> will match the whole paragraph if the cursor is at position 0.
> 
> Searching backwards gives basically the same matches as searching
> forwards. This may be confusing but I actually don't know another way to
> match backwards instead of matching forwards and taking the last match.

Looks nice, and certainly something long awaited.  ...but use
development/tools/makepatch for creating patches to avoid lines like:
"Only in lyxtest/src/: BufferView.o" in the diff.

I've tested it with a few of the more bizarre test patterns and spotted a
bug already though. ;)  Try searching backwards for "?" (bizarre test
pattern matching...let's see now... zero or more occurences of ...nothing at
all, maybe? :-P) ...yields a spinlock in the do-while at lyxfr1.C:458

Not that that particular test pattern makes much sense, but a user may be
looking for the character `?' and forget to switch off regular expressions.
...I'm not even convinced it is a legal test pattern.  Can a regexp atom
really be a null string?  (regexp bug?)

[a few minutes later]
Backwards search for "n?" also yields a spinlock.
"n?x" works though. (`n' and `x' being any plain characters)





Joacim
-
With both feet on the ground, you won't get very far.
                -- Loesje

Reply via email to