ZyX wrote:
> Try the following code:
>
>
> echo matchlist('abc', '\%#=1\v(\_.{-})\C(%(\V\\\v)*)@>(\V%\v|%$)')
> echo matchlist('abc', '\%#=2\v(\_.{-})\C(%(\V\\\v)*)@>(\V%\v|%$)')
>
> . You will see that output differs: first version (with old engine) contains
> “abc” in first capturing group and full text, second version contains “abc”
> only in full text, but not in any capturing group. Given these regexes this
> should not be possible: all matched text is always covered by one of three
> capturing groups. The following regex seems to be the minimal example:
>
> echo matchlist('a', '\v(.)($)@>')
>
> . Note: you can put into second parenthesis anything you like that does match
> and you can have any number of capturing group before capturing group with
> `@>` attached: all preceding groups will be empty.
>
> Workaround: use non-capturing group for `@>` and surround it with
> capturing group.
I can reproduce it, thanks for the good example. One more for the todo
list...
--
Birthdays are healthy. The more you have them, the longer you live.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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.