title: Strange whitespace missing on a regex
body: <p>I have this kind of regex on PHP :</p>
  
  <pre><code>$str="first word https://www.helloz.it last word";
  $str=preg_replace(
      '#[^"](((http|https|ftp)://)[^\s\n]+)#',
      '&lt;a class="lforum" href="$1"&gt;$1&lt;/a&gt;',
      $str);
  echo nl2br($str);
  </code></pre>
  
  <p>And the output that I'll expect is :</p>
  
  <pre><code>first word &lt;a class="lforum" href="https://www.helloz.it"&gt;https://www.helloz.it&lt;/a&gt; last word
  </code></pre>
  
  <p>but in fact the output is :</p>
  
  <pre><code>first word&lt;a class="lforum" href="https://www.helloz.it"&gt;https://www.helloz.it&lt;/a&gt; last word
  </code></pre>
  
  <p>(notice the missing whitespace between <code>first word</code> and <code>&lt;a class...</code></p>
  
  <p>Where is it vanished that whitespace? :) Thanks</p>