foreach lua code example Example: lua foreach in a string for c in string.gmatch(“sentence”,”.”) do print(c) end