From: gabriele renzi Date: 2003-11-19T16:52:17+09:00 Subject: Re: String startswith/endswith in Ruby? il Wed, 19 Nov 2003 09:03:54 +0900, Harry Ohlsen ha scritto:: >Hi David, > >While using a regex to do something so simple seems a bit excessive, looking for a value at the start or end of a string is really just a special case of a more general problem, which regex matching solves very neatly. well, IMO It is less error prone, may be implemented in a faster way, and is more clear to the casual reader. Plus, like every builtin it avoide reinventing the weel. Did you noticed 4 people gave 3 different answers? another quick way to do it : if 'ciao'[/iao$/] :) >