text = "++++001------zx.......?????????xxxxxxx" p text.gsub(/(.)\1+/m).to_a# => ["++++", "00", "------", ".......", "?????????", "xxxxxxx"]
Standard input is empty
["++++", "00", "------", ".......", "?????????", "xxxxxxx"]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!