fork download
  1. text = "++++001------zx.......?????????xxxxxxx"
  2. p text.gsub(/(.)\1+/m).to_a
  3. # => ["++++", "00", "------", ".......", "?????????", "xxxxxxx"]
Success #stdin #stdout 0.01s 6412KB
stdin
Standard input is empty
stdout
["++++", "00", "------", ".......", "?????????", "xxxxxxx"]