From: "Peña, Botp" Date: 2007-08-12T13:26:13+09:00 Subject: Re: Split a string based on change of character From: William James [mailto:w_a_x_man@yahoo.com] # s = "ZBBBCZZ" # ==>"ZBBBCZZ" # s.scan( /((.)\2*)/ ).transpose.first # ==>["Z", "BBB", "C", "ZZ"] # s.gsub( /(.)(?!\1)/, "\\1\n" ).split # ==>["Z", "BBB", "C", "ZZ"] ruby hacker, James, that is cool! gotta keep this. kind regards -botp