I want to get the values of some parameters in a URL, I know the idea but I don't know how to do get them.
I have an string that is an URL:
local url="fbconnect://success?to[0]=213322147507203&to[1]=223321147507202&request=524210977333164"
I want to detect the sub-strings "to[" and get the numbers 293321147507203,293321147507202 and store them in a table.
I know the process is detect the sub-string to[ and then get the sub-string that is 3 character (or 6 not sure if it counts from the beginning of "to[" and then get the number, always is a 15 digit number.
Here you go, a slightly more general solution for parsing query string, supporting string and integer keys, as well as
implicit_integer_keys[]
:For URL
fbconnect://success?to[0]=213322147507203&to[1]=223321147507202&request=524210977333164&complex+name=hello%20cruel+world&to[string+key]=123
it returns: