title: preg_match numbers and comma
body: <p>I have some values like 4,3 or 5 for instance.</p>
  
  <p>I want to allow only the numbers (from 0 to 9) and the comma.</p>
  
  <p>I found this function, pregmatch but it's not working correctly. </p>
  
  <pre><code>&lt;?php
  $regex="/[0-9,]/";
  if(!preg_match($regex, $item['qty'])){
  // my work
  }
  ?&gt;
  </code></pre>
  
  <p>What's wrong ?
  Thanks</p>