How does asterisk affect expressions in Ruby?
<p>I'm confused about why does asterisk have an impact on the regular expressions results in Ruby? Example codes are below:</p>

<pre><code>2.3.0 :001 &gt; "abbcccddddeeeee"[/z*/]
 =&gt; "" 
2.3.0 :002 &gt; "abbcccddddeeeee"[/z/]
 =&gt; nil 
</code></pre>

<p>Why the first one with <code>*</code> returns an empty string, while the other one returns <code>nil</code>?</p>

<p>Thanks!</p>