fork(2) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var text =
  9. @"Supplier
  10. Aker Solutions Malaysia,
  11. PKFZ Malaysia
  12. QS Plan ID/Project
  13. ITP Number";
  14.  
  15. var match = Regex.Match(text, "Supplier\n(?:.*\n){2}(.*)\n(.*)");
  16. var res1 = match.Groups[1];
  17. var res2 = match.Groups[2];
  18.  
  19. Console.WriteLine(res1);
  20. Console.WriteLine(res2);
  21. }
  22. }
Success #stdin #stdout 0.04s 134720KB
stdin
Standard input is empty
stdout
QS Plan ID/Project
ITP Number