From: William James Date: 2008-03-07T07:39:57+09:00 Subject: Re: Sequence reduction On Mar 6, 1:13 pm, James Gray, Junior wrote: > On Mar 6, 2008, at 1:01 PM, Stephen Fickas wrote: > > > I'd like to take a string like that below > > > "0011122234667889" > > > and reduce to > > > "012346789" > > How about this? > > >> "0011122234667889".split("").uniq.join > => "012346789" Not good. irb(main):002:0> "0011122234667889".squeeze => "012346789" > > James Gray, Junior