in reply to Look-behind regex to

While you are working on this solution, it might be a good idea to remember that there are valid protocols (little used, yes) you might want to watch for - (gopher is the only one to spring to mind at the moment - I'd bet a *insert small amount of currency of choice here* that there are more)

Cheers,
Erik

Replies are listed 'Best First'.
URI protocols
by Kozz (Friar) on Mar 21, 2002 at 23:03 UTC
    Good point. My code above doesn't cover nearly all the possibilities: http, https, ftp, gopher, ssh, telnet, finger, news, irc, and so many that are far more obscure or rarely used these days. I will likely expand it to include these options, despite the fact 99.9% of the end-users of the system I'm building will never use those "non-www" protocols. ;)