需求:15088881234 > 150****1234
方法1:
string phone = "15088881234"; string p1 = phone.Substring(0, 3) + "****" + phone.Substring(7, 4);
方法2:
string phone = "15088881234"; string p2= Regex.Replace(phone "(\d{3})\d{4}(\d{4})", "$1****$2");
//两种方法都可以,请随意