Get parameters from URL, get substrings in a query string and store them in a table
snippet in lua

Get parameters from URL, get substrings in a query string and store them in a table

user7484

local url="fbconnect://success?to[0]=213322147507203&to[1]=223321147507202&request=524210977333164"
local some_table = {}
for i, v in url:gmatch'to%[(%d+)]=(%d+)' do
   some_table[tonumber(i)] = v  -- store value as string
end
print(some_table[0], some_table[1]) --> 213322147507203 223321147507202