fork(3) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8.  
  9. String s = @"CMD.EXE was started with the above path as the current directory.
  10. UNC paths are not supported. Defaulting to Windows directory.
  11. Initializing.
  12. jsdns jsdnjs wuee uwoqw duwhduwd 9-8 is = COM10
  13. uuwe sodks asjnjx";
  14.  
  15. Match m = Regex.Match(s, @"\b(?i:com\d+)");
  16. if (m.Success)
  17. Console.WriteLine(m.Value);
  18.  
  19. }
  20. }
Success #stdin #stdout 0.08s 33720KB
stdin
Standard input is empty
stdout
COM10