Amended on Sat 16 May 2009 08:22 PM (UTC) by WillFa
Message
Lua pattern matching isn't the same as PCRE. The rex library has all the pcre syntax you're looking for.
The simple answer to your question is "No. Use 'or' between 2 string.find calls" :)
yoda = string.find(solo, "[hHtTpPsSmMaAiIlLoO]+://[%S]*[%w#/]")
or string.find(solo, "www") or string.find(solo, "WWW")
Lua Pattern matching doesn't support an | as "OR", or {}s for repetition quantifiers (i.e. %w{2,3} doesn't match at least 2 but no more than 3 alpha chars.)
Lua patterns tend to run a bit faster, since they're more simplistic. The speed of the language generally matches or exceeds the speed of compiling a rex regexp.
function IsUrl (darth)
local vader = darth:lower()
if vader:find("^http://") or vader:find("^mailto://")
or vader:find("^www") then
return true
end
end
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.