title: regular expression to consider periods after numeric character only in php
body: <p>I have the following code</p>
  
  <pre><code>&lt;?php
  $str="$str="115(JOHN DOE.)      900,000.00 SALARY.    45 AGE.   "; 
  $str=preg_replace("/[a-zA-Z(),]/", "", $str);          
  echo $str=preg_replace('!\s+!', ',', $str);
  ?&gt;
  </code></pre>
  
  <p>This output</p>
  
  <pre><code>115,.,900000.00.,45.,
  </code></pre>
  
  <p>but this is not exactly what i need, i need to consider period which is inside 900,000.00 and ignore that of JOHN DOE. , SALARY.,AGE.</p>
  
  <p>How can i do that to get</p>
  
  <pre><code>115,900000.00,45
  </code></pre>
  
  <p>I.e i need regular expression to consider periods after numeric character only </p>