title: Regular expression to match a string that contains only numbers, not letters
body: <p>My code is currently using the following Regex expression which matches on numbers:</p>
  
  <pre><code>Regex numberExpression = new Regex(@"(?&lt;Number&gt;\d+)");
  </code></pre>
  
  <p>This current works fine for input strings like "1", "100", "1a", "a1", etc....</p>
  
  <p>But I want to change it so it does NOT match when the input string contains a letter, so "1", "100" would match, but "1a", "a1", would not.</p>
  
  <p>Can anyone help, I know this is a simple regular expression question but I can't get my head around the forward and backward looking. I have tried:</p>
  
  <pre><code>Regex numberExpression = new Regex(@"(?&lt;Number&gt;^![a-zA-Z]\d+![a-zA-Z])");
  </code></pre>
  
  <p>but that didn't work, and fails to match any of the above input.</p>