fork(2) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. var text = @"PATH1 = d:\Software\system\SETUP\folder1
  8. PATH2 = d:\Software\system\SETUP\folder2
  9. PATH3 = d:\Software\system\SETUP";
  10. string pattern = "d:\\Software\\system";
  11. string replace = "C:\\Software\\system";
  12.  
  13. string newText = Regex.Replace(text, Regex.Escape(pattern), replace, RegexOptions.IgnoreCase);
  14. Console.WriteLine(newText);
  15. }
  16. }
Success #stdin #stdout 0.11s 24376KB
stdin
Standard input is empty
stdout
PATH1         = C:\Software\system\SETUP\folder1
PATH2         = C:\Software\system\SETUP\folder2
PATH3         = C:\Software\system\SETUP