Lua String Manipulation (Find Words Before & After)
snippet in lua

Lua String Manipulation (Find Words Before & After)

user1499

local str = "Say hello to=Stack overflow, Say goodbye to=other resources"
for question, answer in string.gmatch(str..",", "([^=]+)=([^,]+),%s*") do
  print(question, answer) 
end