title: How to check a string contains only digits and one occurrence of a decimal point?
body: <p>My idea is something like this but I dont know the correct code</p>
  
  <pre><code>if (mystring.matches("[0-9.]+")){
    //do something here
  }else{
    //do something here
  }
  </code></pre>
  
  <p>I think I'm almost there. The only problem is multiple decimal points can be present in the string. I did look for this answer but I couldn't find how.</p>