Можно создать дубликат:
Is there an equivalent of Array#find_index for the last index in ruby?рубин струна резка
У меня есть строка
story = "Everything before the word irrelevent is irrelevent. Everything after it is relevent"
Я хочу, чтобы удалить все, прежде чем (и включая) последнее совпадение " irrelevent». Как это сделать в рубине.
[Что вы пробовали ?] (http://whathaveyoutried.com) –
http: // stackove rflow.com/questions/3553947/is-there-an-equivalent-of-arrayfind-index-for-the-last-index-in-ruby – nhahtdh