#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?<=Code:).*Distribution\s([\d.,]+)(?=\n)"
Local $sString = "Code: 210 - Test 1 - Distribution" & @CRLF & _
"267745 Vis - Branch Deposit 3/10/2021 2,000.00" & @CRLF & _
"468040 v- Branch Deposit 2/10/2021 1,700.00" & @CRLF & _
"586075 Visa 3/3/2021 555.48" & @CRLF & _
"502490 Vis 3/4/2021 1,835.51" & @CRLF & _
"403195 Vis 3/4/2021 2,033.56" & @CRLF & _
"500230 Vis 3/4/2021 651.29" & @CRLF & _
"" & @CRLF & _
"Code: 210 - Test - Distribution 8,775.84" & @CRLF & _
"Code: 230 - Greenville - Distribution" & @CRLF & _
"853955 Clearing 2/1/2021 77.50"
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