title: preg_match parenthesized pattern
body: <p>I'm trying to change a bunch of decimals in a string to two decimal points. The regex seems to match it just fine. The problem is with the replace.</p>
  
  <p>This is my code:</p>
  
  <pre><code>$input_lines = "-33.873293252 151.201538015999972,-33.873175 151.201689183999946";
  
  print preg_replace("/[0-9]+(\.[0-9][0-9]?)?/", "$0 $2", $input_lines);
  </code></pre>
  
  <p>Which outputs <em>decimal that I want</em> | <em>truncated decimals that I don't want</em>:</p>
  
  <pre><code> -33.87 3293252  151.20 1538015999972 ,-33.87 3175  151.20 1689183999946 
  </code></pre>
  
  <p>So I tried changing the <code>replacement</code> to <code>$0</code>. But now the replace stopped working, and is instead giving me:</p>
  
  <pre><code>-33.873293252 151.201538015999972,-33.873175 151.201689183999946
  </code></pre>
  
  <p>How can I rewrite my regular expression so it gives me the desired output?</p>