using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"(?:\A|\n{2})(?:\n{2}(*SKIP)(*FAIL)|.)+?\.(?=\n{2}|\Z)";
string input = @"Diagnosis of one of the following: A) Neovascular (wet) age-related
macular degeneration OR B) Macular edema following retinal vein
occlusion, OR C) Diabetic macular edema OR D) Diabetic retinopathy in
patients with diabetic macular edema. More text here.
PA Criteria
Criteria Details
Eylea (s)
Products Affected
EYLEA
Exclusion
Criteria
Required
Medical
Information
Age Restrictions
Prescriber
Restrictions
Coverage
Duration
Other Criteria
Off Label Uses
12 months
Indications
All Medically-accepted Indications.
Formulary ID 20276, Version 12
101";
RegexOptions options = RegexOptions.Singleline;
foreach (Match m in Regex.Matches(input, pattern, options))
{
Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for C#, please visit: https://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex(v=vs.110).aspx