title: How to give regular expression for Regex.ismatch function?
body: <p>I am trying to write a regular expression for accepting a Number of length upto 14 and if they keep the decimal point then it should accept only 2 numbers after the decimal point.</p>
  
  <p>I have tried it from this link below :
  <a href="https://stackoverflow.com/a/9967694/861995">https://stackoverflow.com/a/9967694/861995</a></p>
  
  <p>But, the same Regex.IsMatch function is not accepting the normal regex expression's starting with ^ and ending with $.</p>
  
  <p>Please help me on this i am new to regular expressions</p>
  
  <pre><code>private void ChangedSellUp_KeyDown(object sender, KeyEventArgs e)
      {            
          string pattern = "^[0-9]*$";            
          Regex rx = new Regex(pattern);
          if (rx.IsMatch(ChangedSellUp.Text))
          {
              e.Handled = true;
          }
      }  
  </code></pre>
  
  <p>Here ChangedSellup.Text is my text box value, i am trying to restrict the value based on 2 conditions</p>
  
  <ol>
  <li>Its Should Accept only Numbers and length should not increase 14 till Decimal Point.</li>
  <li>If decimal Point is there after that only 2 numbers are allowed.</li>
  </ol>
  
  <p>e.g ; valid Values -  14.23, 12345678901234.23
        Invalid values - 1.2344, 12345678901234.3455</p>
  
  <p>Please help me with the regex ??</p>