<li><strong>Add <codeclass="python hljs"><spanclass="hljs-string">'?'</span></code> after <codeclass="python hljs"><spanclass="hljs-string">'*'</span></code> and <codeclass="python hljs"><spanclass="hljs-string">'+'</span></code> to make them non-greedy.</strong></li>
</ul>
<div><h3id="matchobject">Match Object</h3><pre><codeclass="python language-python hljs"><str> = <Match>.group() <spanclass="hljs-comment"># Returns the whole match. Also group(0).</span>
<str> = <Match>.group(<spanclass="hljs-number">1</span>) <spanclass="hljs-comment"># Returns part in the first bracket.</span>
<str> = <Match>.group(<spanclass="hljs-number">1</span>) <spanclass="hljs-comment"># Returns the part inside first brackets.</span>
<tuple> = <Match>.groups() <spanclass="hljs-comment"># Returns all bracketed parts.</span>
<int> = <Match>.start() <spanclass="hljs-comment"># Returns start index of the match.</span>
<int> = <Match>.end() <spanclass="hljs-comment"># Returns exclusive end index of the match.</span>
draw.ellipse((WIDTH/<spanclass="hljs-number">2</span>-R, y, WIDTH/<spanclass="hljs-number">2</span>+R, y+R*<spanclass="hljs-number">2</span>), fill=<spanclass="hljs-string">'white'</span>)