mIRC Homepage
Posted By: phishes $regex - 20/03/05 03:53 PM
I just downloaded Tidy_Trax's url highlighter, works fantastic
i was wondering about 1 small addition though, which would be good for me, telnet links

ie; <a href="telnet://fakeroot.com:23" target="_blank">telnet://fakeroot.com:23</a>

Code:
 
  .echo -q $regsub(%text,/((?:ftp:\/\/|https?:\/\/|www2?\.)[^&lt;&gt;\.\s]+(?:\.[^&lt;&gt;\.\s]+)+(?:\/[^&lt;&gt;\.\s]+)*)/g,07\1,%text)
  .echo -q $regsub(%text,/(irc:\/\/[^&lt;&gt;\.\s]+(?:\.[^/&lt;&gt;\.\s]+)+(?:\/[^/&lt;&gt;\.\s]*)?\/?(?![^\s\x2c\.]))/g,07\1,%text)
  .echo -q $regsub(%text,/(aim:goim\?screenname=[^\s&amp;]+(?:&amp;message=[^\s&amp;=]+)?)/g,07\1,%text) 

I wouldn't know where the hell to start with that, would someone be able to help me? thanks very much.
Posted By: tidy_trax Re: $regex - 20/03/05 04:00 PM
I don't know exactly how telnet links are formatted and what they allow, etc, but from your example this should work:

Code:
  .echo -q $regsub(%text,/((?:telnet:\/\/|ftp:\/\/|https?:\/\/|www2?\.)[^&lt;&gt;\.\s]+(?:\.[^&lt;&gt;\.\s]+)+(?:\/[^&lt;&gt;\.\s]+)*)/g,07\1,%text)
  .echo -q $regsub(%text,/(irc:\/\/[^&lt;&gt;\.\s]+(?:\.[^/&lt;&gt;\.\s]+)+(?:\/[^/&lt;&gt;\.\s]*)?\/?(?![^\s\x2c\.]))/g,07\1,%text)
  .echo -q $regsub(%text,/(aim:goim\?screenname=[^\s&amp;]+(?:&amp;message=[^\s&amp;=]+)?)/g,07\1,%text) 
© mIRC Discussion Forums