local STR = [[print("Hi")]]

for i in string.gmatch(STR, "[%\"%w.=%s*%\"]+") do
	print(i)
end

i have no idea of how to get the index of the match

help please?

1 comment

0

first of all, why do you want the index?