Ruby 1.9 Syntax

  • Thread starter James Edward Gray II
  • Start date
J

James Edward Gray II

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
 
Y

Yukihiro Matsumoto

Hi,

In message "Re: Ruby 1.9 Syntax"

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top