title: PHP Regex: match text urls until space or end of string
body: <p>This is the text sample:</p>
  
  <pre><code>$text = "asd dasjfd fdsfsd http://11111.com/asdasd/?s=423%423%2F gfsdf http://22222.com/asdasd/?s=423%423%2F
  asdfggasd http://3333333.com/asdasd/?s=423%423%2F";
  </code></pre>
  
  <p>This is my regex pattern:</p>
  
  <pre><code>preg_match_all( "#http:\/\/(.*?)[\s|\n]#is", $text, $m );
  </code></pre>
  
  <p>That match the first two urls, but how do I match the last one? I tried adding [\s|\n|$] but that will also only match the first two urls.</p>