in reply to Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
s = "ZBBBCZZ" x = s.scan(/((.)\2*)/).map{|v|v[0]}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
by Anonymous Monk on Sep 11, 2007 at 08:20 UTC |