lua-users home
lua-l archive

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


On 23/08/2010 22.07, Wesley Smith wrote:
don't forget that %d takes an int:

v1, v2 = str:match("val (%d+) | (%d+)")
v1, v2 = tonumber(v1), tonumber(v2)

Wouldn't that miss the minus sign?
(%-*%d+)

  Enrico