Ingo Karkat wrote:

> there's another discrepancy between the regular expression engines:
> 
> for n in [0, 1] | echo string(matchstr(' x', '\%#=' . n . '^\s\{-}\zs\(x\| 
> x$\)')) | endfor
> for n in [0, 1] | echo string(matchstr(' x', '\%#=' . n . '^\s\{-}\ze\(x\| 
> x$\)')) | endfor
> for n in [0, 1] | echo string(substitute(' x', '\%#=' . n . '^\(\s\{-}\)\(x\| 
> x$\)', '\1|\2', '')) | endfor
> 
> It apparently depends on the non-greedy \s\{-} match together with the
> branches where only one is anchored. It does _not_ matter whether the
> split is introduced with \zs, \ze, or capturing groups.
> 
> To reproduce, use above scriptlet or the identical attached script:
> 
> vim -N -u NONE -S bad-re3.vim
> 'x'
> ' x'
> ' '
> ''
> ' |x'
> '| x'
> 
> This is with a huge build of Vim 7.4.110, running in an Ubuntu 13.04 x64
> VM.

I'll add it in the todo list.

-- 
hundred-and-one symptoms of being an internet addict:
19. All of your friends have an @ in their names.

 /// 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.

Raspunde prin e-mail lui