eregex.vim icon indicating copy to clipboard operation
eregex.vim copied to clipboard

Can't reverse-search with a zero-width negative lookahead assertion

Open chocolateboy opened this issue 9 years ago • 2 comments

eregex.vim: e1692107da0b678001127e9cdcacf028f5c246a8 vim: 7.4 OS: Linux

I have a logfile that looks something like this:

host: example.com
action: frobnicate foo
status: OK

host: example.com
action: bamboozle baz
status: network error

I want to search for entries that don't have "status: OK" i.e. the errors. This works fine when searching from the top down e.g.

:M/status: (?!OK)

But it's not working for me at all with a reverse search. I navigate to the bottom of the document, enter:

:M?status: (?!OK)

And get the following error:

E486: Pattern not found: status: (

chocolateboy avatar Jul 01 '16 07:07 chocolateboy

I get the same error when with a zero-width positive lookahead assertion. Works in forward search, but not backward search.

huyz avatar Nov 10 '22 10:11 huyz

hi, this has been fixed?

Silentdoer avatar Dec 08 '22 16:12 Silentdoer