[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Any LPEG tutorial for laymen ?
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 24 Sep 2013 17:16:02 +0200
2013/9/24 Jayanth Acharya <email@example.com>:
>> Use `require("lpeg")` if you want to manually create all the patterns
>> or `require("re")` if you want to use a regular expression syntax
> If someone can share 2 small illustrative examples of when to use
> which one, or why -- it'd be excellent.
IMHO the "re" module is mainly useful as a demo of just how
powerful LPEG is. It will only save you time if you are already
a fair virtuoso with regular expressions. Otherwise, LPEG
directly just gives so much more lfexibility.