//时间日期正则 表达式
string s_reg = @"(((((1[8-9]\d{2})|([2-9]\d{3}))([-/._])(10|12|0?[13578])([-/._])(3[01]|[12][0-9]|0?[1-9]))|(((1[8-9]\d{2})|([2-9]\d{3}))([-/.])(11|0?[469])([-/.])(30|[12][0-9]|0?[1-9]))|(((1[8-9]\d{2})|([2-9]\d{3}))([-/._])(0?2)([-/._])(2[0-8]|1[0-9]|0?[1-9]))|(([2468][048]00)([-/.])(0?2)([-/.])(29))|(([3579][26]00)([-/._])(0?2)([-/._])(29))|(([1][89][0][48])([-/.])(0?2)([-/.])(29))|(([2-9][0-9][0][48])([-/._])(0?2)([-/._])(29))|(([1][89][2468][048])([-/.])(0?2)([-/.])(29))|(([2-9][0-9][2468][048])([-/._])(0?2)([-/._])(29))|(([1][89][13579][26])([-/.])(0?2)([-/.])(29))|(^([2-9][0-9][13579][26])([-/.])(0?2)([-/.])(29)))((\s+(0?[1-9]|1[012])(:[0-5]\d){0,2}(\s[AP]M))?KaTeX parse error: Undefined control sequence: \s at position 3: |(\̲s̲+([01]\d|2[0-3]…))";
Regex dateRegex = new Regex(s_reg);
if (dateRegex.IsMatch(时间.tostring())
{
return true;
}