<p><br>
On Jul 31, 2011 8:57 PM, "Christopher King" <<a href="http://g.nius.ck">g.nius.ck</a>@<a href="http://gmail.com">gmail.com</a>> wrote:<br>
> What would happen is if you do something like.<br>
><br>
> match=re.search('^(?PP<tag>[a-z])*$', 'abc')<br>
> Then the match.groupdict() would return<br>
> {'tag.0':'a', 'tag.1':'b', 'tag.2':'c', 'tag.-1':'c', 'tag.-2':'b', 'tag.-3':'a'}<br>
> notice the PP. This means that it will save all the times it matches.</p>
<p>If you want to return something that supports negative indexing, why not return a list instead of an ad-hoc string representation? </p>