lua-users home
lua-l archive

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


Romulo wrote:

> On Mon, Oct 25, 2010 at 4:45 PM, Andreas Matthias
> <andreas.matthias@gmail.com> wrote:
>> The LPeg manual says that -lpeg.P(1) should match the
>> end of string. But the following always results in 'nil'.
>> 
>>   print(lpeg.match(lpeg.P'foo' - lpeg.P(1), 'foo'))
> 
> It should be:
> print(lpeg.match(lpeg.P'foo' * -lpeg.P(1), 'foo'))

Oh, that's why. I'm embarrassed.

Thank you.


Ciao
Andreas