fork(2) download
  1. using System;
  2. using System.IO;
  3. using System.Text.RegularExpressions;
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var testEcl = "\"D:\\src\\repos\\myprj\\bin\\Debug\\MyApp.exe\" /?";
  9. var asmName = string.Empty;
  10. var m = Regex.Match(testEcl, @"([^\\]+)\.exe", RegexOptions.IgnoreCase);
  11. if (m.Success)
  12. {
  13. asmName = m.Groups[1].Value;
  14. }
  15. Console.WriteLine(asmName);
  16. }
  17. }
  18.  
  19.  
Success #stdin #stdout 0.04s 133824KB
stdin
Standard input is empty
stdout
MyApp