public static final boolean isCarLicenseNo(String carLicenseNo) {
return carLicenseNo.matches("^[\\u4e00-\\u9fa5][A-Z]((?![IO])[A-Z0-9]){4}((?![IO])[A-Z0-9 挂学警港澳])$");
}
public static void main(String[] args) {
System.out.println(isCarLicenseNo("陕A12456"));
System.out.println(isCarLicenseNo("陕AI2456"));
System.out.println(isCarLicenseNo("陕AI245警"));
System.out.println(isCarLicenseNo("陕AP245警"));
System.out.println(isCarLicenseNo("陕AP2O5警"));
}
【utils】车牌号判断
最新推荐文章于 2023-05-12 11:30:54 发布