lua-users home
lua-l archive

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

> > For instance?
> I have lua embedded in system where users can define table of variables and
> then write expressions to process them. However i think it would be
> reasonable to have some sanity checks in place, so i don't have to explain
> why formulas using variable called "TIME-MAX" are not working :-) and stuff
> like that...

Up to reserved words, the Lua pattern "^[%a_][%w_]*$" should do the job.

-- Roberto