title: PHP search a string for http:// or www
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2762260/detecting-a-url-using-preg-match-without-http-in-the-string">Detecting a url using preg_match? without  in the string</a>  </p>
  </blockquote>
  
  
  
  <p>I wanting to search a string that is input by the user, for instances of http:// if one is found I want to wrap the link in the correct html,</p>
  
  <p>so for example, the following could be input by a user, 
  </p>
  
  <pre><code> Google's url is http://www.google.com,
  </code></pre>
  
  <p>what I want to save that as it, 
  </p>
  
  <pre><code> Google's url is &lt;a href="http://www.google.com/"&gt;http://www.google.com&lt;/a&gt;
  </code></pre>
  
  <p>is this possible?</p>