lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Sep 27, 2018 at 6:40 AM Sai Manoj Kumar Yadlapati
<ysaimanojkumar@gmail.com> wrote:
> 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?

this is a very useful and often needed feature to add to Lua's builtin patterns.
i also would like to see it added and had that topic also on my
wishlist of items
that should be added to Lua.

"|" grouping of alternatives is not only present in PCRE, but also in
POSIX regex,
contained in the libc of unix systems and hence usable without the need of
extra libs like PCRE.