fork download
  1. s = ",,,,C3:,D3,E3,F3,,"
  2. puts s.gsub(/\G,/, ' ').sub(/,+\z/, ']').sub(/:,+/, ': [')
Success #stdin #stdout 0.05s 9696KB
stdin
Standard input is empty
stdout
        C3:  [D3,E3,F3]