Thanks everyone for prompt response and explanation.
Cheers!
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Mon, Aug 30, 2010 at 2:56 PM, Hugo Arts wrote:
> To solve, we have the non-greedy patterns. They eat not as much
> possible, but as little as possible. To make a qualifier non-greedy,
> simply add an asterix at its end:
>
> r'WORD1-.*?'
>
> I would also like to offer one small correction: an a
On Tue, Aug 31, 2010 at 12:02 AM, Serdar Tumgoren wrote:
> To make a qualifier non-greedy,
>>
>> simply add an asterix at its end:
>>
>> r'WORD1-.*?'
>>
>
> Hugo explains this nicely, but I just wanted to make one minor correction
> -- the non-greedy qualifier is the question mark AFTER an the a
On 8/30/2010 4:52 PM, Sam M wrote:
Hi Guys,
I'd like remove contents between tags that matches pattern
"WORD1" as follows:
Change
"stuff word1-emai...@domain.com more stuff
word1-emai...@domain.com still more stuff
word2-emai...@domain.com stuff after WORD2
word1-emai...@domain.com"
To
To make a qualifier non-greedy,
> simply add an asterix at its end:
>
> r'WORD1-.*?'
>
>
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
On Mon, Aug 30, 2010 at 10:52 PM, Sam M wrote:
> Hi Guys,
>
> I'd like remove contents between tags that matches pattern "WORD1"
> as follows:
>
> Change
> "stuff word1-emai...@domain.com more stuff
> word1-emai...@domain.com still more stuff
> word2-emai...@domain.com stuff after WORD2
> word1-e
Hi Guys,
I'd like remove contents between tags that matches pattern "WORD1"
as follows:
Change
"stuff word1-emai...@domain.com more stuff
word1-emai...@domain.com still more stuff
word2-emai...@domain.com stuff after WORD2
word1-emai...@domain.com"
To
"stuff more stuff still more s