From: Robert Klemme Date: 2004-04-14T01:04:11+09:00 Subject: Re: perl pos function equivalent in ruby? schrieb im Newsbeitrag news:200404131520.i3DFKlQN003599@sharui.nakada.niregi.kanuma.tochigi.jp... > Hi, > > At Fri, 9 Apr 2004 10:53:51 +0900, > John W. Long wrote in [ruby-talk:96846]: > > I know about MatchData. Perl's pos function basically returns the position > > of the end of the current match. Which sounds like MatchData#end, the > > difference is you can set pos so that you specify the begining in the string > > of the next search. I haven't seen anything in Ruby like this. > > Use 2nd argument to String#index. I wonder what he needs that for. Often that can be dealt with by changing the RX in a way that String#scan is sufficient. robert