lua-users home
lua-l archive

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


2014-10-27 17:54 GMT+02:00 Jain, Punit <Punit.Jain@emc.com>:

> How can I check whether a string is a hexadecimal number or not? E.g.
> “0x123” is a hex string, but “123” and “xyz” are not.

str:match("0x[0-9a-f]+")