Regula expression ruby question

text = “Ruby on Rails Ruby for Rails Recipie for Rails”.
term = ‘Rails’

How do I find the position of all the places where “Rails” occur in the
above text. Please note that I want the index [position] where rails
begin
in the above text.

Thanks.
-=-

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs