Why does a*a match aaa? : <p>I am using python3 re module - I find that <code>a*a</code> matches <code>aaa</code>. I thought that regex was greedy by default (unless we override it to be lazy with <code>?</code>) - so, <code>a*</code> would have matched the entire string, and the trailing <code>a</code> in the pattern would fail. However, it matches:</p>

<pre><code>$ import re
$ re.match(r'a*a', 'aaa')
&lt;_sre.SRE_Match object; span=(0, 3), match='aaa'&gt;
</code></pre>

<p>Should this not fail?</p>
