title: Match URL Scheme with Port
body: <p>I'm trying to match the the URI / URL scheme (e.x. ftp, http, https) using this regex <code>^(.*:)</code> . The problem is that my url has a port number so the <code>:</code> to connote server connection in the scheme isn't the only one in the URL there is also <code>:80</code>. How do I just match the scheme using regex?</p>
  
  <p>Given this example:</p>
  
  <pre><code>http://video.google.co.uk/videoplay?docid=-7246927612831078230&amp;hl=en#00h02m30s
  </code></pre>
  
  <p>I would like regex to just match:</p>
  
  <pre><code>http
  </code></pre>
  
  <p>I'm not interested in something like </p>
  
  <pre><code>^((http[s]?|ftp):\/)
  </code></pre>
  
  <p>I know this would work it, it is limiting however. It wouldn't give me <code>mailto, tel, ssh, etc.</code> </p>