Subject: Question about regex and date formatting
From: "lph Bl" <jdezenzio gmail.com>
Date: Thu, 2 Jul 2009 01:21:26 +0900
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/.