[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lpeg: matching end of string
- From: Romulo <romuloab@...>
- Date: Mon, 25 Oct 2010 16:52:03 -0200
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'))
--rb