title: Regex for urls without http, https, ftp
body: <p>I'm looking for a regex that accept urls like these:</p>
  
  <pre><code>http://www.example.com
  www.example.com
  </code></pre>
  
  <p>This is what I have so far, but it regex doesn't match URLs without <code>http://</code> or <code>https://</code>, or <code>ftp://</code>:</p>
  
  <pre><code>regexp = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&amp;%@!\-\/]))?/;
  </code></pre>
  
  <p>How can I make the protocol optional?</p>