中扬CRM客户关系管理系统
LSH
2023-08-24 7cced07216f9be95eb6d5c26b74c2e736cda3594
1
2
3
4
5
6
7
8
9
10
11
package com.zy.crm.manager.utils;
 
import java.util.regex.Pattern;
 
public class CarNumberUtils {
    private static final Pattern LICENSE_PLATE_PATTERN = Pattern.compile("^[\u4e00-\u9fa5]{1}[A-Z]{1}[A-Z_0-9]{5}$");
 
    public static boolean isValidLicensePlate(String licensePlate) {
        return LICENSE_PLATE_PATTERN.matcher(licensePlate).matches();
    }
}