title: Regex pattern for numbers with dots
body: <p>I need a regex expression for this</p>
  
  <p>any number then . and again number and . </p>
  
  <p>So this is valid</p>
  
  <pre><code>1.3.164.1.2583.15.46
  546.598.856.1.68.268.695.5955565
  </code></pre>
  
  <p>but</p>
  
  <pre><code>5..........
  ...56.5656
  </code></pre>
  
  <p>are not valid</p>
  
  <p>I tried patterns like:</p>
  
  <pre><code>pattern = "[0-9](\\.[0-9]?*)?*";
  pattern = "[0-9](\\.[0-9]?*)?$";
  pattern = "[^0-9\\.]";
  </code></pre>
  
  <p>but none of these fulfill my requirement. Please help?</p>
  
  <p>My existing code is</p>
  
  <pre><code>String PATTERN="\\d+(\\.\\d+)*";
  @Override
  public void insertString(int arg0, String arg1, AttributeSet arg2)
  {
  
      if(!arg1.matches(this.PATTERN))
          return;
  
      super.insertString(arg0, arg1, arg2);
  }
  </code></pre>