title: Regular expression to validate percentage
body: <p>I want to validate input string such that </p>
  
  <pre><code>5.0  is correct 
  5.5% is correct 
  </code></pre>
  
  <p>So I started with the following code:</p>
  
  <pre><code>string decimalstring1 = "10000.55";
  string decimalstring2 = "5%5%";
  
  string expression = @"^\d|\d%";
  
  Regex objNotNumberPattern = new Regex(expression);
  
  Console.WriteLine(objNotNumberPattern.IsMatch(decimalstring1));
  Console.WriteLine(objNotNumberPattern.IsMatch(decimalstring2));
  Console.ReadLine();
  </code></pre>
  
  <p>But the problem is that with input like 5%5%  it gives <code>correct</code></p>
  
  <p>How can I modify this expression to make this work?</p>