Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a way to get string.gmatch to also print numbers?

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

1 comment

0

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.

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.