public string CustomerMobileNumberMasking(string input) { string Output = ""; input = string.Empty; try { if (!string.IsNullOrWhiteSpace(input)) { string pattern = @"\d(?!\d{0,1}$)"; string result = Regex.Replace(input, pattern, m => new string('*', m.Length)); Output = result; } return Output; } catch (Exception ex) { return Output; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)