title: Regex asterisk usage
body: <p>According to <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions" rel="nofollow noreferrer">MDN</a>
   <code>x* : *Matches the preceding item x 0 or more times.*</code></p>
  
  <p>Essentially the preceding characters should be completely optional. The string will be matched whether they exist or not. So why is it that:</p>
  
  <p><strong>1.</strong></p>
  
  <pre><code>var text  = "foobar";
  var re    = /q*/;
  var found = text.match(re);
  console.log(found); // prints '["", index: 0, input: "foobar"]'
  </code></pre>
  
  <p>but </p>
  
  <pre><code>var re    = /qz*/;
  console.log(found); // prints 'null'
  </code></pre>
  
  <p>Both expressions equally don't exist and thus should be matched 0 times and '""' should be returned.</p>
  
  <p>Or:</p>
  
  <p><strong>2.</strong></p>
  
  <pre><code>var re    = /fz*/;
  console.log(found); // prints '["f", index: 0, input: "foobar"]'
  </code></pre>
  
  <p>but</p>
  
  <pre><code>var re    = /fzq*/;
  console.log(found); // prints 'null'
  </code></pre>
  
  <p>What's happening here? From my understanding <code>'fzq'</code> doesn't exist so should be matched 0 times, and '""' should be returned, right? And if it somehow matches on per character basis instead of the whole string, <code>'fzq*'</code> should return the same result as <code>'fz'</code> - <code>'f'</code> is matched once and the rest is matched 0 times. But apparently this is not what's happening.</p>
  
  <p>Could someone shed some light on what the hell is happening here?</p>