James Gray
5/4/2008 6:11:00 PM
On May 4, 2008, at 8:25 AM, loveajax@gmail.com wrote:
> On May 4, 5:40 am, Pit Capitain <pit.capit...@gmail.com> wrote:
>> 2008/5/3 <lovea...@gmail.com>:
>>
>>> 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