Re: How to get only numbers from a string
Posted: Friday 16 August 2019 6:58
Use a split function with a space as delimiter.
Code: Select all
function split(s, delimiter)
result = {};
for match in (s..delimiter):gmatch("(.-)"..delimiter) do
table.insert(result, match);
end
return result;
end