From: Shashank Date Date: 2002-06-27T21:21:49+09:00 Subject: Re: index regex question Thanks, matz. I have worked around the problem using Array#each_with_index. n = nil a = ["this","is","his","book"] a.each_with_index {|r,i| n = i if (r =~ /^is$/) break if n } And to get the effect of Array # rindex just comment out the break statement. Any other suggestions are highly welcome. -- Shanko "Yukihiro Matsumoto" wrote in message news:1025154592.403173.3285.nullmailer@picachu.netlab.jp... > Hi, > > In message "index regex question" > on 02/06/27, "Shashank Date" writes: > > |Not sure how index function works with regex > > Array#index uses "==" to compare, so the answer is "no". > > matz. >