lph Bl wrote:
> I'm trying to check whether yyyy-dd-mm in a string or date is true.
> 
> I've tried:
> 
> date = "2009-06-01"
> date =~ /^\d{4}-\d{2}-\d{2}$/
> 
> returns => 0
> 
> It should return true.  What am I missing here?

That's the correct response. =~ return the starting position of the 
string that was matched. If there is no match it returns nil.

-- gw
-- 
Posted via http://www.ruby-forum.com/.