From: David Alan Black Date: 2002-05-20T04:05:17+09:00 Subject: Re: Ruby regex question Hello -- On Mon, 20 May 2002, Michael Campbell wrote: > > You want a method called #match that throws away the match? :-) > > > Why not? How many times in c do you throw away the return from > printf()? A better analogy would be a method called "printf()" that didn't print anything. Or, if you really want to return only submatches but not the actual match on a pattern match, maybe a printf() that only printed the interpolated parts: printf("Hello %s\n", "there"); # => "there" :-) Anyway, the return from String#match (MatchData object or nil) can be used in a Boolean test, as well as being mined for the match and submatches, so there's really no problem. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav