1 2 3 4 5 6 7 8
s = "Please don't reinvent the wheel." chunks = {} for substring in s:gmatch("%S+") do table.insert(chunks, substring) end print(table.concat(chunks, ","))
1
Please,don't,reinvent,the,wheel.