[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Named backreferences with Oniguruma

Berger, Daniel

7/27/2006 2:31:00 PM



> -----Original Message-----
> From: nobu@ruby-lang.org [mailto:nobu@ruby-lang.org]
> Sent: Thursday, July 27, 2006 8:13 AM
> To: ruby-talk ML
> Subject: Re: Named backreferences with Oniguruma
>
>
> Hi,
>
> At Thu, 27 Jul 2006 22:35:18 +0900,
> Daniel Berger wrote in [ruby-talk:204267]:
> > >> 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?

Thanks,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.

1 Answer

Nobuyoshi Nakada

7/27/2006 2:50:00 PM

0

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