title: regular expression for web site
body: <p>i am working with jquery and i was wondering what is the best regular expression for web site that will allow the following examples :</p>
  
  <ul>
  <li><p><a href="http://www.google.com" rel="nofollow">http://www.google.com</a></p></li>
  <li><p><a href="https://www.google.com" rel="nofollow">https://www.google.com</a></p></li>
  <li><p>www.google.com</p></li>
  <li><p>google.com</p></li>
  </ul>
  
  <p>i was using this expression but its not working with all the examples .</p>
  
  <pre><code>[A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&amp;=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&amp;=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&amp;;%@.\w_]*)#?(?:[\w]*))?
  </code></pre>