替换手机号码的中间四位为星号 
便如13800000000
变成138****0000 

解决方案 »

  1.   

    string result = Regex.Replace(yourStr,@"(\b\d{3})\d{4}","");
      

  2.   

    写漏了
    string yourStr = "13800000000";
    string result = Regex.Replace(yourStr, @"(?<=\b\d{3})\d{4}", "****");
      

  3.   

    (?<=\b\d{3})\d{4})这正则我完全看不懂。
      

  4.   

    string yourStr = "13800000000";
    string result = Regex.Replace(yourStr, @"(?<=\b\d{3})\d{4}", "****");
    This is it~
      

  5.   

    yeah。我勉强看得懂。。
    果然强人