Thursday, April 23, 2015

Re: positive lookbehind

On 23 April 2015, Claus Atzenbeck <claus.atzenbeck@freenet.de> wrote:
> On Thu, 23 Apr 2015 at 10:46am +0200, Christian Brabandt wrote:
>
> >Well, at least, this is consistent with both regexp engines ;)
> >
> >I think the problem is, that the '^' prevents a match of the following word.
>
> Apparently this is the case. I'm wondering why.
[...]

Because the anchor is not inside the lookbehind group, thus it isn't
optional. Since the lookbehind group is matched with zero width, you're
effectively asking Vim to match /\v^\w+ .

/lcd

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: