|
|
vexed2
|
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 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 |
|
|
|
|
vexed2
|
vexed2
|
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
|
|
|
|
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 ^
|
|
|
|
vexed2
|
vexed2
|
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.
|
|
|
|
|
|