On Thursday, June 20, 2013 10:07:59 AM UTC+7, Ben Fritz wrote:
> On Wednesday, June 19, 2013 8:13:55 PM UTC-5, kien wrote:
> > While `\v(&&|str)` (order reversed) works and doesn't cause the error.
> > 
> > Both expressions work with the old regexp engine.
> 
> While you shouldn't get an error message...I don't think that pattern is 
> doing what you think unless you're just trying weird things to break the 
> regex engine.
> 
> With very magic on, & by itself is the same as \& with regular magic. It 
> looks like you're trying to match a literal string of two '&' characters. For 
> that, if using \v, you need to escape it with a backslash. See :help /\&.

& didn't/doesn't need to be escaped. `\v(&&|str)` works without any error.

Also, this is from an existing line of code so I prefer not to have to change 
it, especially when there have been issues like `\@>, \@!, etc. not supported`, 
or `only accepts up to \{,10}`.

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