title: What is the regex for “Any positive integer, excluding 0”
body: <p>There is already an other post for this but i can't comment on it.
  Sorry for that.</p>
  
  <p>I used </p>
  
  <pre><code>var pattern = new RegExp('^[1-9]\d*$'); 
  var result = fieldValue.search(pattern);
  </code></pre>
  
  <p>but i get a "-1" if I put 12</p>
  
  <p>It allows me just number from 1 to 9 and no more.</p>
  
  <p>Is there something wrong?</p>