title: Matching decimals in strings using matcher()
body: <p>I have a question regarding the matcher. Currently I am trying to read a string and store all the digits into an array. My question is, how do you try to match both integers and decimals?</p>
  
  <p>I have an array of doubles called: </p>
  
  <blockquote>
    <p>double[] thisArray = new double[20];</p>
  </blockquote>
  
  <p>Into this array, i am trying to store all the numbers I extract from the string.</p>
  
  <blockquote>
    <p>Matcher temp =
    Pattern.compile("(\d+)").matcher(x);</p>
  </blockquote>
  
  <p>That is my function for the matcher. But this only matches integers. I want to match both integers and decimals like (5.2). But how do I do this? I want to be able to enter in both integers and decimals into my string. </p>
  
  <p>Any help would be appreciated. Thanks!</p>