title: modify regex to allow floating point number
body: <p>I had in my code, among other patterns, this one to identify integers</p>
  
  <pre><code>Pattern patternNumber = Pattern.compile("[0-9]+");
  </code></pre>
  
  <p>To read input, I've been using*:</p>
  
  <pre><code> String input = "x: 1.6 ..10;";
   String[] meta = a.split("(?:(?&lt;=^|\\s)(?=\\S)|(?&lt;=\\S|^)(?=\\s))\\b(?:(?&lt;=\\S)(?=\\s|$)|(?&lt;=\\s)(?=\\S|$))|\\b");
  </code></pre>
  
  <p>*Courtesy of what I found <a href="https://stackoverflow.com/questions/8267307/regex-expression-to-match-whole-word/8267757#8267757">here</a>, slightly modified to fit. I don't have a lot of experience with Regex, but that line magically worked for me.</p>
  
  <p>Then I moved on to also include floating point numbers:</p>
  
  <pre><code>Pattern patternNumber = Pattern.compile("\\d*\\.\\d+|\\d+");
  </code></pre>
  
  <p>But now I can't seem to get it working. For the floating number part, it splits the number, giving me:  </p>
  
  <pre><code>1  
  .  
  6
  </code></pre>
  
  <p>And what I want is:</p>
  
  <pre><code>1.6
  </code></pre>
  
  <p>I discovered it works if I use solely:</p>
  
  <pre><code> String input = "1.6";
   String[] meta = a.split("\\D\\.\\D");
  </code></pre>
  
  <p>Any idea on how I can make this part work with the rest of the expression on the split method?</p>