fork(3) 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 regex = new Regex("(A)(bC*)*");
  12. var tedwr = regex.Matches("AbCCbbCbCCCCbbb");
  13. var match = regex.Matches("AbCCbbCbCCCCbbb")
  14. .Cast<Match>()
  15. .SelectMany(x => x.Groups.Cast<Group>()
  16. .SelectMany(v => v.Captures
  17. .Cast<Capture>()
  18. .Select(t => t.Value)
  19. )
  20. )
  21. .ToList();
  22. foreach (var s in match)
  23. Console.WriteLine(s);
  24. }
  25. }
Success #stdin #stdout 0.03s 30200KB
stdin
Standard input is empty
stdout
AbCCbbCbCCCCbbb
A
bCC
b
bC
bCCCC
b
b
b