Liam Clarke wrote:
regexes are common across a lot of languages, even Java has them. Though the pain that would be I daren't not imagine. So the syntax is
familiar, whereas string methods may not be.
But IMHO string methods are (more) explicit and readable, the name tells you what the method is doing. I know that sometimes regexp are really fine, e.g. extracting something from html or maybe speed issues (can anyone enlighten me on that one?), but for simple task like the OP's problem I'd always use string methods.

Wolfram

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to