Remove : in port number for hostname and fix regex