fork(1) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. String original = "this is your sensitive digit 12345 , if you have any question please call 123456789";
  9. String pattern = @"(?<!\d)(?!123456789(?!\d))\d{4,}";
  10. String result = Regex.Replace(original, pattern, "****");
  11. Console.WriteLine(result);
  12. }
  13. }
  14.  
Success #stdin #stdout 0.1s 29452KB
stdin
Standard input is empty
stdout
this is your sensitive digit **** , if you have any question please call 123456789