I'm making a script that makes a list of popular http adresses which users post in the mainchat. But I have a problem with the detection of http adress, because this doesn't work =
local HttpFind = "^(http%:%/%/)[^%.]+%p%S+"
what should I use instead for it to work???
It must be the "http://" part of the detection that I can't get to work.
Maybe these can help you (got from plop's sneaky anti-advertiser):
local s,e,webadver = string.find(data,"%b<>%s+http://([^%.]+%.[^%.]+%.%S+)")
local s,e,msg,webadver,msg2 = string.find(data, "%b<>%s(.*)http://([^%.]+%.[^%.]+%.%S+)(.*)$")
Cheers
QuoteOriginally posted by jiten
Maybe these can help you (got from plop's sneaky anti-advertiser):
local s,e,webadver = string.find(data,"%b<>%s+[URL]http://[/URL]([^%.]+%.[^%.]+%.%S+)")
local s,e,msg,webadver,msg2 = string.find(data, "%b<>%s(.*)[URL]http://[/URL]([^%.]+%.[^%.]+%.%S+)(.*)$")
Cheers
Thanx jiten :D, the second one works + I have improved it so it can detect both http://www and just //http://
which is good because one string find is faster than two :D
Anytime :]