using System.Text.RegularExpressions;
class ITSRegEx_AY
{
public static boolean validateDateString(str dateString)
{
str pattern = @"^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$";
Regex regex = new Regex(pattern);
Match match = regex.Match(dateString);
return match.Success;
}
}