| |
8. 10. 2. Date format consists of one or two digits followed by a hyphen, followed by one or two digits, followed by a hypen, followed by four digits |
|
public class MainClass {
public static void main(String args[]) {
String date = "12-12-1212";
String datePattern = "\\d{1,2}-\\d{1,2}-\\d{4}";
System.out.println(date.matches(datePattern));
}
}
|
|
8. 10. 验证 | | 8. 10. 1. | 原始地址验证 | | | | 8. 10. 2. | Date format consists of one or two digits followed by a hyphen, followed by one or two digits, followed by a hypen, followed by four digits | | | | 8. 10. 3. | 查找重复的话 | | | | 8. 10. 4. | 名称审定 | | | | 8. 10. 5. | 电话号码验证 | | | | 8. 10. 6. | 邮编审定 | | | | 8. 10. 7. | 字符串使用英语同义词 | | | | 8. 10. 8. | 匹配数字 | | |
|