[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lpeg as a part of lua (was: An introduction to Lua)
- From: Sean Conner <sean@...>
- Date: Sun, 22 Oct 2017 22:09:48 -0400
It was thus said that the Great Charles Heywood once stated:
> Wouldn't this be a lookahead for three characters and a "$", and if so,
> match three characters? That should work perfectly fine in LPeg.
Reread the pattern:
%?.-([^$][^$][^$])%$
So,
?123$ - matches, should return 123
?987654321$ - matches, should return 321
?12$ - no match, should return nil
?12$$ - no match, shoudl return nil
which means the LPeg pattern I gave is slightly incorrect. I'll fix it in
another message.
-spc