Messing around, and I just wanted to know, is there a way to get string.gmatch to also print numbers?
s = ("a b c d e 1 2 3 4")
for w in string.gmatch(s, "%a+") do
print(w)
end
Messing around, and I just wanted to know, is there a way to get string.gmatch to also print numbers?
s = ("a b c d e 1 2 3 4")
for w in string.gmatch(s, "%a+") do
print(w)
end
Thank you, so much! :D
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
According to the wiki http://wiki.roblox.com/index.php?title=String_patterns#Character_Classes you can print alphanumeric characters (both letters and numbers) with %w, or you can print straight up numbers with %d.