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

Pierre Barbier de Reuille pierre.barbier at cirad.fr
Wed Feb 9 09:44:15 CET 2005

Wolfram Kraus a écrit :
> 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

I completely agree ! Then, it will very probably be more efficient. And 
the methods (or functions) like "startwith" are avalaible in almost 
every string library !


Pierre Barbier de Reuille

INRA - UMR Cirad/Inra/Cnrs/Univ.MontpellierII AMAP
Botanique et Bio-informatique de l'Architecture des Plantes
TA40/PSII, Boulevard de la Lironde

tel   : (33) 4 67 61 65 77    fax   : (33) 4 67 61 56 68

More information about the Tutor mailing list