Or better yet use this alias: alias urlget { if ($regex($1-,/(http|www|com|net|org|irc\.)/)) { return $wildtok($1-,$+(,$regml(1),),1,32) } }