[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lpeg: matching end of string
- From: Andreas Matthias <andreas.matthias@...>
- Date: Mon, 25 Oct 2010 21:22:16 +0200
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