lua-users home
lua-l archive

Re: Description of lpeg.B

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi!
Dirk Laurie <dirk.laurie <at> gmail.com> writes:
> 2014年1月22日 Matthias Kluwe <mkluwe <at> gmail.com>:
> > I've found that
> >
> > lpeg.match( 2 * lpeg.B'sd', 'asdf' )
> >
> > matches (and returns 3). If the "current position" is preceded by 'sd', it
> > must be "before the 'f'"? But the call returns 3, which is the index of the
> > first character after the match, and that is the 'd'!?
> 
> I can't reproduce the reported behaviour.
> 
> $ lua -l lpeg
> Lua 5.2.3 Copyright (C) 1994-2013 Lua.org, PUC-Rio
> > print(lpeg.version())
> 0.12
> > print(lpeg.match( 2 * lpeg.B'sd', 'asdf' ))
> nil
Thank you for testing this!
I'm outdated -- my installed LPeg version is 0.10.2.
Regards,
Matthias

AltStyle によって変換されたページ (->オリジナル) /