mIRC Home    About    Download    Register    News    Help

Print Thread
#188448 23/10/07 06:13 PM
Joined: Mar 2007
Posts: 218
V
vexed2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
I found this little alias on a pastebin, but it never said who was the author so i can't give any thanks.
I was wondering if anyone that knows regsubex can add to this so that as well as urls
It'll highlight irc links and email addresses when pasted into a channel.
Here's the alias

Code:
alias urlu {
  return $regsubex($1-,/\b(www\.\S+|http://\S+|\w+(?:[\.-]\w+)?@\w+(?:[\.-]\w+)?\.[a-z]{2,4})\b/gi,$+(2,\1,))
}

vexed2 #188449 23/10/07 06:21 PM
Joined: Oct 2006
Posts: 166
B
Vogon poet
Offline
Vogon poet
B
Joined: Oct 2006
Posts: 166
old fashion.


Kind Regards, blink
b1ink #188450 23/10/07 06:30 PM
Joined: Mar 2007
Posts: 218
V
vexed2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
Well... thanks, that helped me confused

vexed2 #188463 23/10/07 08:55 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Originally Posted By: vexed2
I found this little alias on a pastebin, but it never said who was the author so i can't give any thanks.
I was wondering if anyone that knows regsubex can add to this so that as well as urls
It'll highlight irc links and email addresses when pasted into a channel.
Here's the alias

Code:
alias urlu {
  return $regsubex($1-,/\b(www\.\S+|http://\S+|\w+(?:[\.-]\w+)?@\w+(?:[\.-]\w+)?\.[a-z]{2,4})\b/gi,$+(2,\1,))
}


Code:
alias urlu {
  return $regsubex($1-,/\b(\@\S+|www\.\S+|http://\S+|irc\.\S+|irc://\S+|\w+(?:[\.-]\w+)?@\w+(?:[\.-]\w+)?\.[a-z]{2,4})\b/gi,$+(2,\1,))
}


updated with irc\.\ & irc:// & @ but the email doesnt highlight the username just the @ and host I forgot the regexsub string for beginning match


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #188474 24/10/07 04:50 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Code:
alias urlu {
  return $regsubex($1-,/\b(\^@\S+|www\.\S+|http://\S+|irc\.\S+|irc://\S+|\w+(?:[\.-]\w+)?@\w+(?:[\.-]\w+)?\.[a-z]{2,4})\b/gi,$+(2,\1,))
}


Sorry about that i forgot about ^


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Lpfix5 #188480 24/10/07 12:35 PM
Joined: Mar 2007
Posts: 218
V
vexed2 Offline OP
Fjord artisan
OP Offline
Fjord artisan
V
Joined: Mar 2007
Posts: 218
Sweet, seems to underline the first part of the email address for me crazy
But still, it work, that's the main thing cheers!

vexed2 #188484 24/10/07 03:03 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
ya I fixed it in the second code.

^ is the beginning of a value @ was the searching value and \S+ is whatever is after value.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Link Copied to Clipboard