title: Masked Input Plugin and regular expressions (for decimal numbers)
body: <p>I have a text input field in which I want to insert just numbers, then a comma, and then just two decimal digits.</p>
  
  <p>I'm trying to obtain this via jQuery, using <a href="http://digitalbush.com/projects/masked-input-plugin/" rel="nofollow">Masked Input Plugin</a>, but it seems not to work.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>&lt;input type="text" name="cash" id="number"/&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $.mask.definitions['p']='[0-9]+';
  $.mask.definitions['d']='[0-9]{2}';
  $("#number").mask("p,d");
  &lt;script&gt;
  </code></pre>
  
  <p>But the result is a mask with just one digit, then a comma, and then something I'm not able to write (it's not a digit, neither a character)</p>
  
  <pre><code>_,_
  </code></pre>
  
  <p>How can I use regular expression with this plugin?</p>