[Tutor] Newbie - regex question

Hugo Arts hugo.yoshi at gmail.com
Tue Aug 31 00:12:36 CEST 2010


On Tue, Aug 31, 2010 at 12:02 AM, Serdar Tumgoren <zstumgoren at gmail.com> wrote:
>  To make a qualifier non-greedy,
>>
>> simply add an asterix at its end:
>>
>> r'<email>WORD1-.*?</email>'
>>
>
> Hugo explains this nicely, but I just wanted to make one minor correction
>  -- the non-greedy qualifier is the question mark AFTER an the asterisk
> (which is what Hugo's code shows but I believe he accidentally left off).
>

ah, sorry, a bit of cognitive dissonance on my end. You're right of
course. That should've read "To make a qualifier non-greedy, add a
*question mark* at the end."

Hugo


More information about the Tutor mailing list