How to extract numbers from a string in Lua?
snippet in lua

How to extract numbers from a string in Lua?

user545

s = "($1,000)"
res, _ = s:gsub("%D+", "")
print(res)
-- => 1000