|
On 27/09/2018 06:39, Sai Manoj Kumar Yadlapati wrote:
Hi all, Lua supports its own version of regular expression matching. But it doesn't have the | (pipe symbol) support and the quantifier support - a{1,5} meaning a can occur anywhere from 1 to 5 times. Both of these are present in PCRE. I am curious to know why these are not supported.Is it not supported intentionally or was it never considered? Thanks Sai Manoj
To reinforce what Andrew said in his reply: please note that Lua patterns are NOT regular expressions. That is they haven't got the same expressive power as regexes, and that's /by design/. The goal was/is to keep Lua size small.
I can't say if implementing alternation (i.e. that OR operator) will increase Lua size by much, but I suspect it will.
-- Lorenzo