#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)^Case title: +(?<caseTitle>.*\S) *\n+Client: +(?<client>.*?\S) *\n+Origin: +(?<origin>.*?\S) *\n+Contact: +(?<contact>.*?\S) *\n+DSM: +(?<dsm>.*?) *\n+CSM: +(?<csm>.*?\S) *\n+Assigned To: +(?<assignedTo>.*?\S) *\n+Due Date: +(?<dueDate>.*?\S) *\n+Description: +(?<desc>.*?\S) *$"
Local $sString = "Case title: Sample Test case 9" & @CRLF & _
"Client: 8688211" & @CRLF & _
"Origin: Email" & @CRLF & _
"Contact: testing@me.com" & @CRLF & _
"DSM: testContact1" & @CRLF & _
"CSM: testContact1" & @CRLF & _
"Assigned To: testing@me.com " & @CRLF & _
"Due Date: 06/28/2023" & @CRLF & _
"Description: Sample description 9" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Case title: Sample Test case 9" & @CRLF & _
"Client: 8688211 " & @CRLF & _
"Origin: Email " & @CRLF & _
"Contact: testing@me.com " & @CRLF & _
"DSM: testContact1 " & @CRLF & _
"CSM: testContact1 " & @CRLF & _
"Assigned To: testing@me.com " & @CRLF & _
"Due Date: 06/28/2023 " & @CRLF & _
"Description: Sample description 9 "
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