判断使用yyyy/MM/dd格式的日期输入
using System.Text.RegularExpressions;
Boolean IsRightDateFormat(String expression, String wholeString)
{
Boolean rightFormat = false;
expression = "^(?:(?!0000)[0-9]{4}/(?:(?:0?[1-9]|1[0-2])/(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])/(?:29|30)|(?:0?[13578]|1[02])/31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)/0?2/29)$";
Regex rg = new Regex(expression);
rightFormat = rg.IsMatch(wholeString);
return rightFormat;
}