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
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
Hello,
$ cat test
a
b
c
$ vim -u NONE --noplugin test
/a\n\(^b$\n\)\{1,2}c
The search failed with re=0. If I set 're=1', search works.
Thanks,
namsh
$ LANG= vim --version | head -2
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 13 2013 09:51:39)
Included patches: 1-1182
--
--
You
On Thursday, June 13, 2013 6:31:42 PM UTC+12, SungHyun Nam wrote:
/a\n\(^b$\n\)\{1,2}c
I see this, too; it can be simplified to
/a\n^b$
for me to see a difference. The ^ does not match with re=0, though the help
says it should after a \n.
Regards, John Little
--
--
You received this
SungHyun Nam wrote:
$ cat test
a
b
c
$ vim -u NONE --noplugin test
/a\n\(^b$\n\)\{1,2}c
The search failed with re=0. If I set 're=1', search works.
Thanks for reporting. It's easy to reproduce.
Strange that this wasn't caught before.
Looks like the actual problem is matching ^