title: Validate number using regular expression in java
body: <p>Can anyone help me for validation of numbers like:</p>
  
  <blockquote>
    <p>1,478.25</p>
  </blockquote>
  
  <p>Special characters like <code>.</code> And <code>,</code> are only allowed </p>
  
  <blockquote>
    <p><strong><em>(@#$_&amp;-+()/</em>"':;!?~`|•√π÷×¶={} not allowed )*</strong>.</p>
  </blockquote>
  
  <p>This is the regex I have tried so far:</p>
  
  <pre><code>/^[0-9]+([,][0-9]+)?$/
  </code></pre>
  
  <p>Your help will be appreciated.
  Valid number are 123.45    1,234.5 and 0.01</p>