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
in the above text.


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