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