From: Rick DeNatale Date: 2007-10-25T03:14:33+09:00 Subject: Re: string method that takes in a regex On 10/24/07, Parv G. wrote: > Hi, > Is there a string method that takes in a regular expression AND returns > a boolean value? > > Looking at the documentation i can't find a method that meets my > requirements (very surprising). String#match takes a regexp and returns either nil or a MatchData. In Ruby nil is a boolean false, and anything other than nil or false is a boolean true, so this effectively does return a boolean value. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/