[Tutor] Re: print out lines that start with a word

Wolfram Kraus kraus at hagen-partner.de
Wed Feb 9 09:30:09 CET 2005


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



More information about the Tutor mailing list