title: Regex to only allow numbers under 10 digits?
body: <p>I'm trying to write a regex to verify that an input is a pure, positive whole number (up to 10 digits, but I'm applying that logic elsewhere).</p>
  
  <p>Right now, this is the regex that I'm working with (which I got from <a href="https://stackoverflow.com/questions/290513/regex-pattern-for-numeric-values">here</a>):</p>
  
  <pre><code> ^(([1-9]*)|(([1-9]*).([0-9]*)))$
  </code></pre>
  
  <p>In this function:</p>
  
  <pre><code>if (/^(([1-9]*)|(([1-9]*).([0-9]*)))$/.test($('#targetMe').val())) {
              alert('we cool')
          } else {
              alert('we not')
          }
  </code></pre>
  
  <p>However, I can't seem to get it to work, and I'm not sure if it's the regex or the function. I need to disallow %, . and ' as well. I only want numeric characters. Can anyone point me in the right direction?</p>