using System;
using System.Text.RegularExpressions;
public class Test
{
public static bool validarData(string data)
{
Regex r = new Regex(@"(\d{2}\/\d{2}\/\d{4} \d{2}:\d{2})");
return r.Match(data).Success;
}
public static void Main()
{
Console.WriteLine(validarData("01/03/2010 23:00"));
Console.WriteLine(validarData("0//03/2010 23::0"));
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uVGV4dC5SZWd1bGFyRXhwcmVzc2lvbnM7CgpwdWJsaWMgY2xhc3MgVGVzdAp7CglwdWJsaWMgc3RhdGljIGJvb2wgdmFsaWRhckRhdGEoc3RyaW5nIGRhdGEpCgl7CgkJUmVnZXggciA9IG5ldyBSZWdleChAIihcZHsyfVwvXGR7Mn1cL1xkezR9IFxkezJ9OlxkezJ9KSIpOwoJCXJldHVybiByLk1hdGNoKGRhdGEpLlN1Y2Nlc3M7Cgl9CgkKCXB1YmxpYyBzdGF0aWMgdm9pZCBNYWluKCkKCXsKCQlDb25zb2xlLldyaXRlTGluZSh2YWxpZGFyRGF0YSgiMDEvMDMvMjAxMCAyMzowMCIpKTsKCQlDb25zb2xlLldyaXRlTGluZSh2YWxpZGFyRGF0YSgiMC8vMDMvMjAxMCAyMzo6MCIpKTsKCX0KfQ==