[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Chopping the beginning of a string elegantly
From:       "Jason Voegele" <jason () jvoegele ! com>
Date:       2005-07-29 13:30:24
Message-ID: 3456.192.223.163.5.1122643814.squirrel () 192 ! 223 ! 163 ! 5
[Download RAW message or body]

On Fri, July 29, 2005 8:41 am, francisrammeloo@hotmail.com said:
> Hi all,
>
> I'm having some trouble finding an elegant way of removing a part of a
> string based on an pattern.
>
> Suppose I want to chop off the "Begin" in the string "BeginCaption".
[snip]

With all the different responses you've received, it's obvious that the
Perl mantra "There's More Than One Way To Do It" also holds true with
Ruby. :-)

-- 
Jason Voegele
"There is an essential core at the center of each man and woman that
remains unaltered no matter how life's externals may be transformed
or recombined. But it's smaller than we think."
    -- Gene Wolfe, The Book of the Long Sun


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic