优化身份证脱敏正则

springboot3
RuoYi 3 months ago
parent dcc303a8d4
commit 64dc968949

@ -23,7 +23,7 @@ public enum DesensitizedType
/**
* 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

Loading…
Cancel
Save