fork 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 = @"/************************************************************
  12. * Code formatted by SoftTree SQL Assistant © v10.1.278
  13. * Time: 23.04.2021 11:57:15
  14. ************************************************************/
  15.  
  16. /*******************************************
  17. *
  18. * some string 1
  19. *
  20. * some string 2
  21. *
  22. * some string 3
  23. *
  24. *******************************************/";
  25. var result = Regex.Match(s, @"/\*{43}(?:\r?\n \* *(\S.*)?)*\r?\n\*+/")?
  26. .Groups[1].Captures.Cast<Capture>().Select(x => x.Value);
  27. foreach (var s2 in result)
  28. Console.WriteLine(s2);
  29. }
  30. }
Success #stdin #stdout 0.08s 27992KB
stdin
Standard input is empty
stdout
some string 1
some string 2
some string 3