On Tue, 4 Dec 2012, Alex Efros wrote:

Hi!

Is there any reason why "\(\\\n\\\n\)\@<=U" fail to match this text:

\
\
U

while "\(\\\n\\\n\)U" will match it and "\(\\\n\)\@<=U" will match it too (without first line)?

I suspect you're running into (from: :help /\@<= ):

"""
"\@<=" and "\@<!" check for matches just before what follows. Theoretically these matches could start anywhere before this position. But to limit the time needed, only the line where what follows matches is searched, and one line before that (if there is one). This should be sufficient to match most things and not be too slow.
"""

Probably, as it suggests there, you could just use \zs instead:

\\\n\\\n\zsU

--
Best,
Ben

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

Raspunde prin e-mail lui