From: "John@7fff.com Norman" Date: 2009-09-17T03:29:17+09:00 Subject: Re: string to array Re BR: I sent you an e-mail to your hotmail.com mailbox - could you reply? Might be in your spam folder. Re BR wrote: > John@7fff.com Norman wrote: >> Re BR, >> >> I noticed in your original statement of the problem you said the input >> string was "apple-orange-grape" -- so why are you splitting on '.' in >> your sample solution? >> >> That would be appropriate for, oh, I don't know, parts of a domain name, >> but not for "apple-orange-grape" >> >> Re BR wrote: > > Hi John, > > I pasted the wrong line I meant to say > > a.split('-').map{ |i| a[i..-1].join('-') } -- Posted via http://www.ruby-forum.com/.