luigi scarso <[email protected]> a écrit:
> On Mon, Jun 17, 2013 at 7:24 PM, Paul Isambert <[email protected]> wrote:
> 
> >
> > still prints “(abc)()” (the “$” is included to make it comparable to
> > “.*”), whereas the equivalent
> >
> >     echo substitute('abc', '.\{-}$', '(\0)', 'g')
> >
> I don't know vim,

Bad Luigi.

>                   but does zero-width
> http://vimdoc.sourceforge.net/htmldoc/pattern.html
> http://davidchuprogramming.blogspot.it/2012/04/vim-tip-not-containing-pattern-2.html
> have some influence ?

I don’t think so. As expressed in the discussion pointed to by Dirk,
the difference seems to be one of implementation not of semantic
difference between similar operators (although it actually makes a
difference). Dirk even formalized all that (in the same discussion),
and if I understood correctly the punchline is (as long as you agree
with Dirk, as I do): substrings should be closed intervals! Which
makes a nice motto, too bad Lua doesn’t endorse it.

Thanks,
Paul

Reply via email to