From: Dossy Date: 2002-05-19T11:01:40+09:00 Subject: Re: Ruby regex question On 2002.05.19, David Alan Black wrote: > > You want a method called #match that throws away the match? :-) For simplicity, yes. $~[0] contains the match, if and when I ever need it. Out of sheer habit, if I wanted the whole match, I would want to write: x, y, z = "foo bar" =~ /((foo) (bar))/ x # => "foo bar" y # => "foo" z # => "bar" -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)