fork download
  1. using System;
  2. using System.IO;
  3. using System.Linq;
  4. using System.Text.RegularExpressions;
  5. public class Test
  6. {
  7. public static void Main()
  8. {
  9. var text = " 26\r\nData related to the point SP-WFI-21-Room process fluids \r\nSampling Date:16/04/2007 \r\n 28\r\nData related to pint SP-WFI-21-Room process fluids \r\nSampling Date: 20/04/2007 \r\nTEST SPECIFICATIONS RESULTS \r\n 29\r\n3.2.P.4.2 Analytical Procedures \r\nAll the analytical procedures \r\n3.2.P.4.3 Validation of Analytical Procedures \r\nAll the analytical procedures proposed to control the excipients are those reported in Ph. Eur. \r\nāˆ’ 3AQ13A: Validation of Analytical Procedures: Methodology - EUDRALEX Volume 3A \r\n3.2.P.4.4. Justification of Specifications";
  10. var pattern = @"^\s*\d+\s*[\r\n]+(.*?)3\.2\.P\.4\.4\.\s+Justification\s+of\s+Specifications";
  11. var regEx = new Regex(pattern, RegexOptions.RightToLeft | RegexOptions.Singleline | RegexOptions.Multiline );
  12.  
  13. var m = regEx.Match(text);
  14. if (m.Success)
  15. {
  16. Console.WriteLine(m.Groups[1].Value);
  17. }
  18. }
  19. }
  20.  
  21.  
Success #stdin #stdout 0.04s 134592KB
stdin
Standard input is empty
stdout
3.2.P.4.2 Analytical Procedures 
All the analytical procedures 
3.2.P.4.3 Validation of Analytical Procedures 
All the analytical procedures proposed to control the excipients are those reported in Ph. Eur. 
− 3AQ13A: Validation of Analytical Procedures: Methodology - EUDRALEX Volume 3A