title: Use Regex to form a number without leading zeros in Javascript
body: <p>I'm having trouble forming a regular expression that can strips out leading zeros from numbers represented as strings. Sorry but parseFloat isn't what I'm looking for since I'll be dealing with numbers with 30+ decimal places.</p>
  
  <p>My current regular expression is </p>
  
  <pre><code>/(?!-)?(0+)/;
  </code></pre>
  
  <p>Here are my test cases.
  <a href="http://jsfiddle.net/j9mxd/1/" rel="nofollow">http://jsfiddle.net/j9mxd/1/</a></p>
  
  <pre><code>$(function() {
      var r = function(val){
          var re = /(?!-)?(0+)/;
          return val.toString().replace( re, '');
      };
      test("positive", function() {
          equal( r("000.01"), "0.01" );
          equal( r("00.1"), "0.1" );
          equal( r("010.01"), "10.01" );
          equal( r("0010"), "10" );
          equal( r("0010.0"), "10.0" );
          equal( r("10010.0"), "10010.0" );
      });
      test("negative", function() {
          equal( r("-000.01"), "-0.01" );
          equal( r("-00.1"), "-0.1" );
          equal( r("-010.01"), "-10.01" );
          equal( r("-0010"), "-10" );
          equal( r("-0010.0"), "-10.0" );
          equal( r("-10010.0"), "-10010.0" );        
      });
  });
  </code></pre>
  
  <p>Why are my test cases not passing?</p>