I\'m trying to check that dates entered by end users are in the YYYY-MM-DD. Regex has never been my strong point, I keep getting a false return value for the preg_match() I
If you want to match that type of date, use:
preg_match("~^\d{4}-\d{2}-\d{2}$~", $date)