Changed regexp to support non-IP address host names as well.