[Tutor] a little help with the re odule

Mats Wichmann mats at wichmann.us
Sat Jul 18 11:32:24 EDT 2020


On 7/18/20 5:43 AM, Alan Gauld via Tutor wrote:
> On 18/07/2020 11:57, nathan tech wrote:
> 
>> I'm trying to do a little bit of work with the re module but have rather 
>> gotten stuck and am hoping someone will be able to fill in the gaps in 
>> my understanding.
> 
> Sure, but first the usual caveat. regex are immensely powerful and quite
> addictive. But very often the regular string methods are faster and
> simpler. Don't let the cleverness of regex seduce you into over use.

That (entirely true) being said, regular expressions were actually
designed for this kind of processing of natural language where the
contents of the input can vary quite a bit so also don't be scared of
it!  :)




More information about the Tutor mailing list