fork(1) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text.RegularExpressions;
  6.  
  7. public class Test
  8. {
  9. public static void Main()
  10. {
  11. var pattern = @"(Project\(""{[\w-]*}""\) = "")[^\s""]*("", "")[^\s""]*("", ""{[\w-]*}"")";
  12. var inLine = "Project(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Common\", \"Libraries\\Common\\Common.csproj\", \"{91197577-34B9-4D46-B3FE-A8589D4380B1}\"";
  13. var replaced = Regex.Replace(inLine, pattern, @"${1}Blah${2}..\Core\Libraries\Blah\Blah.csproj$3");
  14. Console.WriteLine(replaced);
  15. }
  16. }
Success #stdin #stdout 0.06s 21064KB
stdin
Standard input is empty
stdout
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blah", "..\Core\Libraries\Blah\Blah.csproj", "{91197577-34B9-4D46-B3FE-A8589D4380B1}"