From: Raghu Go Date: 2008-04-26T21:55:56+09:00 Subject: All occurances of a character in a string Hi - I am trying to figure out the ruby way of printing all occurances of a character in a string.. The index method on string gives only the first occurance only. Example input string - abbccdaab desired output - 'a' = 0 6 7 'b' = 1 2 8 'c' = 3 4 'd' = 5 Any help greatly appreciated.. -- Posted via http://www.ruby-forum.com/.