From: botp Date: 2007-08-13T02:27:51+09:00 Subject: Re: Split a string based on change of character On 8/12/07, dblack@rubypal.com wrote: > irb(main):015:0> s.split(//).group_by {|x| x }.map {|e| e.join } > => ["AAAAA", "CC", "EE", "DD", "BB"] > Notice how all the A's got put in one result. arrghh, sorry, yes. it's really grouping w no regards to sequence. thank you for the update kind regards -botp