|
|
Joined: Mar 2007
Posts: 218
Fjord artisan
|
OP
Fjord artisan
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 alias urlu {
return $regsubex($1-,/\b(www\.\S+|http://\S+|\w+(?:[\.-]\w+)?@\w+(?:[\.-]\w+)?\.[a-z]{2,4})\b/gi,$+(2,\1,))
}
|
|
|
|
Joined: Oct 2006
Posts: 166
Vogon poet
|
Vogon poet
Joined: Oct 2006
Posts: 166 |
Kind Regards, blink
|
|
|
|
Joined: Mar 2007
Posts: 218
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2007
Posts: 218 |
Well... thanks, that helped me
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
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 alias urlu {
return $regsubex($1-,/\b(www\.\S+|http://\S+|\w+(?:[\.-]\w+)?@\w+(?:[\.-]\w+)?\.[a-z]{2,4})\b/gi,$+(2,\1,))
}
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
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
Joined: Aug 2005
Posts: 1,052 |
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 ^
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
|
|
|
|
Joined: Mar 2007
Posts: 218
Fjord artisan
|
OP
Fjord artisan
Joined: Mar 2007
Posts: 218 |
Sweet, seems to underline the first part of the email address for me But still, it work, that's the main thing cheers!
|
|
|
|
Joined: Aug 2005
Posts: 1,052
Hoopy frood
|
Hoopy frood
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.
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
|
|
|
|
|
|