fork(1) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text.RegularExpressions;
  5.  
  6. public class Test
  7. {
  8. public static void Main()
  9. {
  10. var pattern = @"^[^_]*_[^_]*(?:_([^_]+))+";
  11. var str = "ABC_BC_BE08_C1000004_0124";
  12. var strings = Regex.Match(str, pattern).Groups[1].Captures.Select(c => c.Value);
  13.  
  14. foreach (String s in strings)
  15. {
  16. Console.WriteLine(s);
  17. }
  18. }
  19. }
Success #stdin #stdout 0.06s 29800KB
stdin
Standard input is empty
stdout
BE08
C1000004
0124