title: C#: Regex for any number plus a decimal point that does not have a limit
body: <p>I am looking for a regex that is capable of validating that a string contains any number from 0 upwards and also allows for a decimal point to be at any position other than something like .1 or .45. By the decimal being at any point I mean the number should be capable of having any number of precision places. </p>
  
  <p>Numbers could really be anything:</p>
  
  <pre><code>1
  2
  3.5
  3.58278723475
  6523424.82347265
  </code></pre>
  
  <p>I have this which of course fails as my regex doesnt take decimal points into account:</p>
  
  <pre><code> foreach (string[] coorPairArray in extents.Select(t =&gt; t.Trim().Split(' ')))
   {
       Regex isnumber = new Regex("^[0-9]+$");
  
       if ((!isnumber.IsMatch(coorPairArray[0]) || (!isnumber.IsMatch(coorPairArray[1]))))
       {
           dataBaseConnection.Close();
  
           throw new ArgumentException("Error: An extent value contained alphanumeric data. GetExtentsAsGml().");
       }
    }
  </code></pre>