title: Regular expression help for InputFilter for EditText in Android
body: <p>I need to implement an input filter for limiting numeral entry in the format <code>1234.35</code>. That is, maximum four before <code>.</code> and two decimal places. I am using this <a href="http://en.wikipedia.org/wiki/Regular_expression" rel="nofollow">regular expression</a> pattern:</p>
  
  <pre><code>Pattern.compile("[0-9]{0,4}+((\\.[0-9]{0,2})?)||(\\.)?");
  </code></pre>
  
  <p>This works, but once I enter a number in the edit text and try to edit the values before the decimal places, I can't edit them. I can only delete them.</p>
  
  <p>What is wrong?</p>