Hi guys.. I have been working on my date regular expression all day... I want a date format to be YYYY-MM-DD.
$date_regex ='^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$';
if (preg_match($date_regex, $dateString)) {
echo "good format";
}
keeps giving me error
preg_match() [function.preg-match]: No ending delimiter '^' found in test.php on line 19
Anyone help?? Thanks a lot!!