import java.text.ParseException;
public class Test {
public static void main(String[] args) throws ParseException {
String date = "2011-11-11 11:01:50";
System.out
.println(date
.matches("^(20//d{2}-(0//d|1[0-2])-([0-2]//d|3[01]))//s(([01]//d|2[0-3]):[0-5]//d:[0-5]//d)$"));
}
}