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 s = "(AvgC20.1 > 980000) && (C1>C2) MaxC20 MinC20.14";
  12. var pattern = @"(?n)(Avg|Max|Min)[OHLVC]\d+(\.\d+)?";
  13. var result = Regex.Matches(s, pattern)
  14. .Cast<Match>()
  15. .Select(p => p.Value)
  16. .ToList();
  17. foreach (var r in result)
  18. Console.WriteLine(r);
  19. }
  20. }
Success #stdin #stdout 0.03s 30128KB
stdin
Standard input is empty
stdout
AvgC20.1
MaxC20
MinC20.14