[Tutor] uncomprehension on RE

Luke Paireepinart rabidpoobear at gmail.com
Thu Sep 20 13:52:05 CEST 2007


Stephen Nelson-Smith wrote:
> On 9/19/07, cedric briner <work at infomaniak.ch> wrote:
>   
>> Hello,
>>
>> I do not understand the behaviour of this:
>>
>> import re
>> re.search('(a)*','aaa').groups()
>> ('a',)
>>
>> I was thinking that the ``*'' will operate on the group delimited by the
>> parenthesis. And so, I was expecting this result:
>> ('a', 'a', 'a')
>>
>> Is there something I'am missing ?
>>     
>
> <reposting as sent to OP by default... I am sure the list used to
> munge addresses and things were sent to the list by default>
>   
The "reply-to-all" or "reply-list" or "reply-group" functions should do 
what you want.
We'll not get into the semantics of why the list doesn't munge.
It's an unproductive discussion that the admins don't like.
-Luke


More information about the Tutor mailing list