Browse Source

优化身份证脱敏正则

pull/530/head
RuoYi 1 month ago
parent
commit
fb4f63c883
  1. 2
      ruoyi-common/src/main/java/com/ruoyi/common/enums/DesensitizedType.java

2
ruoyi-common/src/main/java/com/ruoyi/common/enums/DesensitizedType.java

@ -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位星号替换

Loading…
Cancel
Save