I am trying to do a pattern search, but it doesn't work. I have this code:
vars = "CmdTurn.on=off/GetPar.pwd=true"
_GET = {}
for k, v in string.gmatch(vars, "(%w+)(%p+)(%w+)=(%w+)&*") do
_GET[k] = v
print(k..":"..v)
end
After run this code I hope see this result:
CmdTurn.on:off
GetPar.pwd:true
But it doesn't work. The wrong result that appears is this one:
CmdTurn:.
GetPar:.
Any one could help me?