On 9/17/13, Axel Bender <[email protected]> wrote:
> The following search command with branches works differently depending on
> which RE engine is chosen:
>
> ^\C[a-z]\+\ze \&\(\.exe\)\@<!
>
> With re=1 the whole first word is selected.
> With re=2 only the first letter of the first word is selected.
>
> Test case included.
I think the following shows what happens (gvim7.4 on Windows).
It's strange combination of \ze, \& and \@<! that makes finding the
end of match ambiguous.
:echo "'". matchstr('ABCD ', '\%#=1^ABCD\ze \&E\@<!') ."'"
:echo "'". matchstr('ABCD ', '\%#=2^ABCD\ze \&E\@<!') ."'"
:echo match('ABCD ', '\%#=1^ABCD\ze \&E\@<!')
:echo match('ABCD ', '\%#=2^ABCD\ze \&E\@<!')
'ABCD'
''
0
0
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.