手机号中间四位,*号代替

string phone = "12345678912";

var newPhone = Regex.Replace(phone, "(\\d{3})\\d{4}(\\d{4})", "$1****$2");

Console.WriteLine(newPhone );

 

c# 正则表达式

 

c#正则表达式

相关文章:

  • 2021-07-02
  • 2021-08-09
  • 2021-06-19
猜你喜欢
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2021-11-24
相关资源
相似解决方案