[#807] Ruby 1.4.1 — Yukihiro Matsumoto <matz@...>
Ruby 1.4.1 is out, check out:
1 message
1999/09/16
[#808] Ruby 1.4.2 — Yukihiro Matsumoto <matz@...>
Ruby 1.4.2 is out, check out:
1 message
1999/09/16
[#816] My favorite language's icon turned into a sheep! — "Francois Le Coguiec" <francois_le_coguiec@...>
Weird!
6 messages
1999/09/27
[#826] feature request — Jonathan Aseltine <aseltine@...>
Hi,
8 messages
1999/09/29
[ruby-talk:00827] Re: feature request
From:
OZAWA Sakuro <crouton@...>
Date:
1999-09-29 03:01:18 UTC
List:
ruby-talk #827
At Tue, 28 Sep 1999 22:55:52 -0400,
Jonathan Aseltine <aseltine@cs.umass.edu> wrote:
> x = "a.b c.d"
> x.gsub!(/(\w).(\w)/) {|i, j| <do something with the matched
> subexpressions>}
> Right now, Ruby only gives the entire matched string to the block.
Try this:
x.scan(/(\w)\.(\w)/) { |i| p i }
i holds Array of matched groups, so you can retrieve each group via
its indices.
--
--
OZAWA -Crouton- Sakuro
<mailto:crouton@duelists.org>
<http://www.duelists.org/~crouton/>