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