Re: Named backreferences with Oniguruma

Daniel B. 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.

Hi,

At Thu, 27 Jul 2006 23:30:39 +0900,
Berger, Daniel wrote in [ruby-talk:204281]:

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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs