How do I serialize the following url with lua?
Is it possible with the "match"?
http://example.com/go.php?user=stack&pass=overflow
Domain: example.com
User: stack
Pass: overflow
How do I serialize the following url with lua?
Is it possible with the "match"?
http://example.com/go.php?user=stack&pass=overflow
Domain: example.com
User: stack
Pass: overflow
Try this:
s="http://example.com/go.php?user=stack&pass=overflow"
d,u,p=s:match("http://(.+)/.*user=(.-)&pass=(.+)")
print(d,u,p)
http://example.com/go.php?pass=overflow&user=stack That should work as well, but wouldn't in this case.