From: Yukihiro Matsumoto Date: 2004-12-28T13:22:59+09:00 Subject: Re: rindex with regexp Hi, In message "Re: rindex with regexp" on Tue, 28 Dec 2004 13:09:58 +0900, "trans. (T. Onoma)" writes: |Using rindex with a regexp would appear to undermine greediness. | |irb(main):012:0> "a--b--c".rindex(/[-]+/) |=> 5 |irb(main):013:0> p $~.begin(0) |5 |I would expect the 5 to be a 4. rindex is as lazy as me not to seek longest match. matz.