#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?s)(?:\A|\n{2})(?:(?!\n{2}).)+\.(?=\n{2}|\Z)"
Local $sString = "Diagnosis of one of the following: A) Neovascular (wet) age-related" & @CRLF & _
"macular degeneration OR B) Macular edema following retinal vein" & @CRLF & _
"occlusion, OR C) Diabetic macular edema OR D) Diabetic retinopathy in" & @CRLF & _
"patients with diabetic macular edema. More text here." & @CRLF & _
"" & @CRLF & _
"PA Criteria" & @CRLF & _
"" & @CRLF & _
"Criteria Details" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Eylea (s)" & @CRLF & _
"" & @CRLF & _
"Products Affected" & @CRLF & _
" EYLEA" & @CRLF & _
"" & @CRLF & _
"Exclusion" & @CRLF & _
"Criteria" & @CRLF & _
"" & @CRLF & _
"Required" & @CRLF & _
"Medical" & @CRLF & _
"Information" & @CRLF & _
"" & @CRLF & _
"Age Restrictions" & @CRLF & _
"" & @CRLF & _
"Prescriber" & @CRLF & _
"Restrictions" & @CRLF & _
"" & @CRLF & _
"Coverage" & @CRLF & _
"Duration" & @CRLF & _
"" & @CRLF & _
"Other Criteria" & @CRLF & _
"" & @CRLF & _
"Off Label Uses" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"12 months" & @CRLF & _
"" & @CRLF & _
"Indications" & @CRLF & _
"" & @CRLF & _
"All Medically-accepted Indications." & @CRLF & _
"" & @CRLF & _
"Formulary ID 20276, Version 12" & @CRLF & _
"" & @CRLF & _
"101"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
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 AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm