Nobuyoshi Nakada
7/27/2006 2:50:00 PM
Hi,
At Thu, 27 Jul 2006 23:30:39 +0900,
Berger, Daniel wrote in [ruby-talk:204281]:
> > > >> I'm trying to figure out how to get at named backreferences with
> > > >> Oniguruma, but I'm having some problems figuring it out. Here's
> > > >> the interface I would *like* to have:
> > > >
> > > > MatchData#[] in 1.8 doesn't take symbols.
> > > >
> > >
> > > Couldn't it be added? I mean, it's a custom re.c anyway, isn't it?
> >
> > To which? Oniguruma doesn't contain the patch for 1.8?
>
> To 1.8.x. I guess I'm a little confused. If I've installed Oniguruma
> properly, should MatchData#[] allow symbols or not for 1.8.x?
No, Oniguruma contains the patch for ruby 1.8.4, but it's only
for just replacement old regexp engine. Named capture is
relatively newer feature so you'd have to ask Kosako-san.
Possibly, it might work by copying re.c from 1.9, though I
haven't tried it.
--
Nobu Nakada