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 = @"/************************************************************
  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 matchValue = Regex.Match(s, @"/\*{43}\r?\n.*?\*/", RegexOptions.Singleline)?.Value;
  26. var result = matchValue.Split(new[] {'\n', '\r'}, StringSplitOptions.RemoveEmptyEntries)
  27. .Where(x => x.Trim().StartsWith("* ")).Select(z => z.Trim().Substring(2));
  28. foreach (var s2 in result)
  29. Console.WriteLine(s2);
  30. }
  31. }
Success #stdin #stdout 0.08s 28844KB
stdin
Standard input is empty
stdout
some string 1
some string 2
some string 3