title: Regex can't differentiate between float and int types
body: <p>I have written regexes for recognizing float and int but they don't seem to work (code below).</p>
  
  <pre><code>{
      string sumstring = "12.098";
  
      Regex flt = new Regex(@" ^[0-9]*(\.[0-9]*)");
      Regex ent = new Regex("^[0-9]+");
  
      if (d_type.IsMatch(sumstring))
      {
          Console.WriteLine(sumstring + " " + "dtype");
      }
  
      Match m = ent.Match(sumstring);
  
      if (m.Success)
      {
          Console.WriteLine("int");
      }
      else if (flt.IsMatch(sumstring))
      {
          Console.WriteLine("float");
      }
  }
  </code></pre>
  
  <p>Where is the mistake?</p>