title: preg_match: number-alphabets and commas only
body: <p>How do I write a regular expression which matches number-alphabets and commas only?</p>
  
  <p>I came out with this one below but it doesnt work - it accepts other punctuation marks as well!</p>
  
  <pre><code># check for matches number-alphabets and commas only
    if(!preg_match('/([a-zA-Z0-9]|[a-zA-Z0-9\,])/', $cst_value))
    {
     $error = true;
     echo '&lt;error elementid="usr_username" message="'.$cst_name.' - please use number-alphabets and commas only."/&gt;';
    }
  </code></pre>
  
  <p>Many thanks,
  Lau</p>