From: "John W. Long" Date: 2004-04-09T10:53:51+09:00 Subject: Re: perl pos function equivalent in ruby? ----- "Dmitry V. Sabanin" wrote: ----- > On Thursday 08 April 2004 11:15, John W. Long wrote: > > What's the equivalent to perl's reexp pos function in ruby? > I don't know what perl's pos does, but here. > Look at MatchData: > . . . 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. See http://www.perldoc.com/perl5.6/pod/func/pos.html . ___________________ John Long www.wiseheartdesign.com