View Single Post
05-11-14, 05:10 AM   #12
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Lua doesn't actually use regex, but a different thing described here:
http://wowpedia.org/Pattern_matching
http://www.lua.org/pil/20.1.html

Personally I just use this pattern for URL matching:
Code:
%l+://%S+
Should work for most situations where people are sensible enough to type out full links and separate it with spaces. I think this is also how it works on most forums and instant messengers and stuff. (they probably validate the protocol sometimes, I guess) I can see why one would want to quickly type out a address manually without using the whole format and have it get linkified, but for me at least, it wouldn't be worth the extra logic required.
__________________
Grab your sword and fight the Horde!
  Reply With Quote