title: How to match regex pattern independent of position?
body: <p>I've the following code working, the purpose is to have only numbers with only one decimal point at max.</p>
  
  <pre><code>String text    =   "121.30"; 
  
  String pattern = "^\\d+\\.{0,1}\\d+$";  
  
  boolean matches = Pattern.matches(pattern, text);
  </code></pre>
  
  <p>What other regex could I use so as not to include the leading digit matching? I mean is it possible to match digit only once regardless of position with respect to decimal point? </p>