From: John W Higgins Date: 2009-09-17T01:20:16+09:00 Subject: Re: string to array --0016e64ba61e216d0e0473b44640 Content-Type: text/plain; charset=ISO-8859-1 Good Morning, On Wed, Sep 16, 2009 at 9:01 AM, Re BR wrote: > Hello all, > > I have a string "apple-orange-grape". I need to create a array that will > look like > ["apple-orange-grape","orange-grape","grape"] > > x = "apple-orange-grape" tmp = x.split('-') (0..tmp.length-1).map{ |i| e[i..-1].join('-') } John --0016e64ba61e216d0e0473b44640--