Regular Expressions

Steven D'Aprano steve at REMOVE.THIS.cybersource.com.au
Sun Feb 11 05:25:01 EST 2007


On Sun, 11 Feb 2007 07:05:30 +0000, Steve Holden wrote:

> Geoff Hill wrote:
>> What's the way to go about learning Python's regular expressions? I feel 
>> like such an idiot - being so strong in a programming language but knowing 
>> nothing about RE. 
>> 
>> 
> In fact that's a pretty smart stance.

That's a little harsh -- regexes have their place, together with pointer
arithmetic, bit manipulations, reverse polish notation and goto. The
problem is when people use them inappropriately e.g. using a regex when a
simple string.find will do.



> A quote attributed variously to 
> Tim Peters and Jamie Zawinski says "Some people, when confronted with a 
> problem, think 'I know, I'll use regular expressions.' Now they have two 
> problems."

I believe that is correctly attributed to Jamie Zawinski.


-- 
Steven




More information about the Python-list mailing list