lua-users home
lua-l archive

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


2014/1/22 Matthias Kluwe <mkluwe@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
> our.