title: Regex to match integer without leading zero (s)
body: <p>I have this regex to match integers </p>
  
  <pre><code>var reg = /^\d+$/;
  </code></pre>
  
  <p>I also want it ensure that 1 or more zeros are not placed at the front</p>
  
  <pre><code>var reg = ^[0\d]\d+$
  </code></pre>
  
  <p>This is what I have so far but doesnt work.</p>
  
  <p>How can this be done?</p>
  
  <p>Passing tests</p>
  
  <pre><code>1
  12
  1232164
  </code></pre>
  
  <p>Failing tests</p>
  
  <pre><code>0
  01
  00004241
  fbhf
  ""
  a123
  </code></pre>