lua-users home
lua-l archive

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


On Wed, Oct 21, 2009 at 1:27 AM, Norbert Kiesel <nkiesel@tbdnetworks.com> wrote:
> On Tue, 2009-10-20 at 17:37 -0200, Luiz Henrique de Figueiredo wrote:
>> > '^(?:(?:ceil|abs|floor|mod|exp|log|pow|sqrt|acos|asin|atan|cos|sin|tan|deg|rad|random)\\(|pi|\\(|\\)|-|\\+|\\*|/|\\d|\\.|\\^|\\x2C|
>> > )+$'
>[snip]
> Actually started doing that, but it's quite complicated.  Can we have |
> in Lua regexp pretty please?  I can work around most other limitations,
> but alternatives are hard (especially like /hi (foo|bar)+ there/).

Can you try using LPeg instead ?
See http://www.inf.puc-rio.br/~roberto/lpeg/

Regards,
Rajesh