For example, if:
for i in string.gmatch(str, "//")
will search for "//" in the string, how would i do the opposite so it returns every part of the string separated by "//"?
you can use the //(.+)
string pattern to get the characters after "//" excluding that, if thats what your looking for.
local str = "//hello world!" for v in string.gmatch(str,"//(.+)") do print(v) end
hello world!