[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: lpeg: matching end of string
- From: Andreas Matthias <andreas.matthias@...>
- Date: Mon, 25 Oct 2010 21:22:16 +0200
> On Mon, Oct 25, 2010 at 4:45 PM, Andreas Matthias
> <firstname.lastname@example.org> 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.