How would I get all the numbers in a string?

You can also use this to get the individual digits:

local word = "a50td@"
for digit in (string.gmatch(word,"%d")) do
    print(digit)
end
3 Likes