function checkURL(url, parametro)
for chave, valor in string.gmatch(url, "(%w+)=(%w+)") do
if valor == parametro then
return true
end
end
return false
end
if checkURL("www.exemplo.htm?chave1=valor1&chave2=valor2", "valor1") then
print ("valor1 está presente na URL")
else
print ("valor1 NÃO foi encontrado na URL")
end
ZnVuY3Rpb24gY2hlY2tVUkwodXJsLCBwYXJhbWV0cm8pCiAgICBmb3IgY2hhdmUsIHZhbG9yIGluIHN0cmluZy5nbWF0Y2godXJsLCAiKCV3Kyk9KCV3KykiKSBkbwogICAgICAgIGlmIHZhbG9yID09IHBhcmFtZXRybyB0aGVuCiAgICAgICAgICAgIHJldHVybiB0cnVlCiAgICAgICAgZW5kCiAgICBlbmQKICAgIHJldHVybiBmYWxzZQplbmQKCmlmIGNoZWNrVVJMKCJ3d3cuZXhlbXBsby5odG0/Y2hhdmUxPXZhbG9yMSZjaGF2ZTI9dmFsb3IyIiwgInZhbG9yMSIpIHRoZW4KICAgIHByaW50ICgidmFsb3IxIGVzdMOhIHByZXNlbnRlIG5hIFVSTCIpCmVsc2UKICAgIHByaW50ICgidmFsb3IxIE7Dg08gZm9pIGVuY29udHJhZG8gbmEgVVJMIikKZW5k