[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: no support for Cf in lpeg "re" module?
- From: Albert Chan <albertmcchan@...>
- Date: Thu, 30 Aug 2018 15:16:00 -0400
> IMHO the reason why 're' exists is not as a more convenient
> alternative to raw LPeg (for me, it isn't), nor yet as a sop to those
> who come to Lua from other languages (when was that ever a
> consideration), but as a demonstration that regex is not more powerful
> than LPeg
>
> -- Dirk Laurie
Sometimes 're' is more concise, and convenient.
For example, try to match double words with raw LPeg:
> =re.match("this-this", "{:word: %a+ :} %A+ { =word }")
this