Lua need to split at comma
snippet in lua

Lua need to split at comma

user7925

string = "cat,dog"
one, two = string:match("([^,]+),([^,]+)")

Lua need to split at comma

user7333

str = 'cat,dog'
for word in string.gmatch(str, '([^,]+)') do
    print(word)
end