[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby 1.9 Syntax

James Gray

9/12/2006 2:52:00 PM

A quick Ruby 1.9 question: I know you can now get at Oniguruma's
named captures from MatchData objects, but is there a syntax for
using them is a sub() replacement string?

Thanks.

James Edward Gray II

1 Answer

Yukihiro Matsumoto

9/12/2006 3:06:00 PM

0

Hi,

In message "Re: Ruby 1.9 Syntax"
on Tue, 12 Sep 2006 23:51:44 +0900, James Edward Gray II <james@grayproductions.net> writes:

|A quick Ruby 1.9 question: I know you can now get at Oniguruma's
|named captures from MatchData objects, but is there a syntax for
|using them is a sub() replacement string?

As far as I know, '\k<word>' should do.

matz.