mIRC Home    About    Download    Register    News    Help

Print Thread
#114985 20/03/05 03:53 PM
Joined: Mar 2005
Posts: 15
phishes Offline OP
Pikka bird
OP Offline
Pikka bird
Joined: Mar 2005
Posts: 15
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.

#114986 20/03/05 04:00 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
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) 


New username: hixxy

Link Copied to Clipboard