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 fileLogs = @"[08:52:18] [ERROR] Ceci doit aparaitre
  9. [08:52:18] [WARN] Bonjour ";
  10. var result = Regex.Match(fileLogs, @"\[(.+)\] \[(.+)\] (.+)");
  11.  
  12. Console.WriteLine(result);
  13. }
  14. }
Success #stdin #stdout 0.13s 24392KB
stdin
Standard input is empty
stdout
[08:52:18] [ERROR] Ceci doit aparaitre