www.com is a valid hostname (even points to a real website). If there's no particular reason that it shouldn't match, the alias below should do the job:
/alias pim return $regsubex($1,/(?<=^| )((?:(?:http|ftp|irc|news|gopher)://)?(?:[a-z\d](?:[a-z\d-]*[a-z\d])?\.)+[a-z]{2,}(?::\d{1,5})?)(/\S*|(?= |$))/gi,$replace(\1,.," dot ",",) $+ \2)