Commit d3326987 authored by RuoYi's avatar RuoYi

优化身份证脱敏正则

parent 4de087b1
......@@ -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位星号替换
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment