Fix a bug where the port-in-hostname regex was too strict. (#1907)
Fix a bug where the port-in-hostname regex was too strict. (#1907)

The regex used to parse a port number out of a hostname (e.g.
'<PORT>-dot-myhost.com'), was meant to support an actual port
number being in the hostname (e.g. '<PORT1>-dot-myhost.com:<PORT2>').

That was how I tested the previous change; by adding a local host
entry for "8083-dot-localhost" and then connecting to
"8083-dot-localhost:8081" to view the ungit UI of a Datalab instance.

However, the previous version of that regex inadvertantly required
the ":<PORT>" suffix in the host header. This meant that the
feature did not work when tried against a real hostname.

This change fixes that by making the ":<PORT>" suffix optional.
parthea/datalab,googledatalab/datalab,parthea/datalab,googledatalab/datalab,parthea/datalab,parthea/datalab,googledatalab/datalab,parthea/datalab,googledatalab/datalab,parthea/datalab,googledatalab/datalab,googledatalab/datalab