[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LPEG vs. PCRE (was: Can someone convert this POSIX regex to a Lua regex?)
- From: Philippe Lhoste <PhiLho@...>
- Date: Thu, 22 Oct 2009 13:57:32 +0200
On 22/10/2009 06:03, Fernando P. García wrote:
Based on your experience, may you tell me why LPEG is better than PCRE?
It might be arguable for simple patterns like checking a date format (without checking the
validity of the date!) or looking that a string has no spaces, for example.
But for real parsing (using context and such), a parser (Peg based or something else) is
always better than a RE engine... :-)
It might be interesting to do some comparisons (memory usage, speed, compactness of
expression vs. readability, etc.) between Lpeg and a binding of PCRE for a number of cases
(from simple cases above to the shown expression using lot of alternatives, look-ahead
expressions and so on).
I am not volunteer...
-- (near) Paris -- France
-- -- -- -- -- -- -- -- -- -- -- -- -- --