View Single Post
05-10-14, 11:54 PM   #7
TULOA
A Wyrmkin Dreamwalker
 
TULOA's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2009
Posts: 50
Originally Posted by semlar View Post
Given how broad your definition of a url is, you could probably try something like this..
Lua Code:
  1. for url in str:gmatch('[.%w-_:/]+%.%a%a+%f[%A]%S*') do print(url) end
now how does that get along with the hidden links for icons and such?

I came up with this code:
url = string.match(str, "[https?://]*[www%.]*[%w+]*[%w+%-]?[%w+%.]+%w+%"..URIs[cURL].."[/w%w+/]+", _x)
pos = string.find(str, "[https?://]*[www%.]*[%w+]*[%w+%-]?[%w+%.]+%w+%"..URIs[cURL].."[/%w+/]+", _x)

But for some reason it wont work in WoW. It works on Repl.it for lua to find an example address of www.cc-test.test.com

It gets stuck on the loading screen. I return my function and it loads but will not detect that address. Or rather just part of it.
  Reply With Quote