On Mon, Jun 20, 2011 at 12:12 PM, Lorenzo Donati
<lorenzodonatibz@interfree.it> wrote:
if pcre.match( haystack, "^foo|bar$" ) then ...
may be rewritten in pure Lua as:
if haystack:match "^foo$" or haystack:match "^bar$" then ...
Ah, but soon as you get multiple alternation, especially nested, then
the resulting code is not so obvious. And obviously it is going to be
slower than any regexp implementation. OK, that may be acceptable for
the application, but the code generation could get hairy fast.