C#隐藏手机号中间四位为*

使用正则:Regex.Replace(手机号, "(\\d{3})\\d{4}(\\d{4})", "$1****$2");

效果:

猜你喜欢

转载自www.cnblogs.com/51net/p/10444237.html