修改正则。

dev
ZhouXY108 2024-10-18 18:40:55 +08:00
parent f2298e934c
commit 3c179f1488
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ public class Chinese2ndGenIDCardNumber extends IDCardNumber {
/** 出生日期 */
private final LocalDate birthDate;
public static final Pattern PATTERN = Pattern.compile("^(((\\d{2})\\d{2})\\d{2})(\\d{8})\\d{2}(\\d)(\\d|X|x)$");
public static final Pattern PATTERN = Pattern.compile("^(((\\d{2})\\d{2})\\d{2})(\\d{8})\\d{2}(\\d)([\\dXx])$");
private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyyMMdd");
private Chinese2ndGenIDCardNumber(String idNumber) {