title: How to count the number of zeros at the start of a string
body: <p>I have a string:</p>
  
  <pre><code>"0011HelloWor00ld001"
  </code></pre>
  
  <p>How do I count the number of zeros in the starting of the string?
  For example, the above string should return 2.</p>
  
  <p>I tried <code>.match(/^[0]+/).size</code> but it doesn't work.</p>