优化身份证脱敏正则

This commit is contained in:
RuoYi 2024-10-21 16:19:17 +08:00
parent 4de087b1ad
commit d3326987a4
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ public enum DesensitizedType
/** /**
* 身份证中间10位星号替换 * 身份证中间10位星号替换
*/ */
ID_CARD(s -> s.replaceAll("(\\d{4})\\d{10}(\\d{4})", "$1** **** ****$2")), ID_CARD(s -> s.replaceAll("(\\d{4})\\d{10}(\\d{3}[Xx]|\\d{4})", "$1** **** ****$2")),
/** /**
* 手机号中间4位星号替换 * 手机号中间4位星号替换