From: James Gray Date: 2008-05-05T03:10:42+09:00 Subject: Re: Backreferences in case statements On May 4, 2008, at 8:25 AM, loveajax@gmail.com wrote: > On May 4, 5:40 am, Pit Capitain wrote: >> 2008/5/3 : >> >>> Where does Ruby store the MatchData if the >>> matching is done in a case statement? >> >> Subbu, there's also Regexp.last_match. Sometimes this reads better >> than those Perl-like variables. >> >> Regards, >> Pit > > Hi Pitt, > > I did use Regexp.last_match. But its a class method. I am interested > in using something like pre_match and post_match methods which are > instance variables. But looks like my code never created the instance > of MatchData. Regexp.last_match.pre_match James Edward Gray II