On Aug 28, 4:25 ¨Âí¬ ôéíò ¼ôéíòá®®®Àçíáéì®ãïí¾ ÷òïôåº
> In ruby you can use string#index as follows:
> str = "some text"
> str.index(/t/)
> =>5
>
> But what if I want to get all the indices for a regex in the string?
> Is there an string#all_indices method?

A lot of solutions have been given here. It would be nice to see a
test/benchmark matrix to compare them, if anyone is up to it.