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?
-- 
Posted via http://www.ruby-forum.com/.