[ruby-talk:00828] Re: feature request

From: OZAWA Sakuro <crouton@...>
Date: 1999-09-29 03:11:46 UTC
List: ruby-talk #828
At Wed, 29 Sep 1999 12:01:18 +0900,
OZAWA Sakuro <crouton@duelists.org> wrote:

> Try this:
> 	x.scan(/(\w)\.(\w)/) { |i| p i }

*PLEASE FORGET THE ABOVE* :-)

Try this instead:
	x.gsub!(/(\w)\.(\w)/) { |match| print "#$1/#$2\n" }

--
OZAWA -Crouton- Sakuro
<mailto:crouton@duelists.org>
<http://www.duelists.org/~crouton/>



In This Thread