From: "Jesús Gabriel y Galán" Date: 2010-04-14T02:19:25+09:00 Subject: Re: How to find multiple matches in a string On Tue, Apr 13, 2010 at 7:01 PM, Alex DeCaria wrote: > Andrea Dallera wrote: >> Hei, >> >>   s = 'abcde_abcde_abcde' >>   m = s.scan(/b/) >>   p m # ['b','b','b'] >> >> HTH >> >> -- >> Andrea Dallera >> http://github.com/bolthar/freightrain >> http://usingimho.wordpress.com > > Thanks Andrea.  But is there a way to also find the locations (indexes) > of the 'b' characters? Take a look at this thread, maybe you can get some ideas: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/337667 Jesus.