#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^.+,.+\n.+\n.+\n\s"
Local $sString = "..." & @CRLF & _
"830 ORLANDO, 382.000CS $ " & @CRLF & _
"FL 16.2400 " & @CRLF & _
"840 TAMPA, FL 382.000CS $ " & @CRLF & _
"16.2400 " & @CRLF & _
"Subtotal 41,310.000CS " & @CRLF & _
"Contract Total 115,560.000CS $ 1,569,663.00 " & @CRLF & _
"" & @CRLF & _
" " & @CRLF & _
"Contractor Total 115,560.000 C S $ 1,569,663.00 " & @CRLF & _
"ABC, INC. " & @CRLF & _
"PO Box 11 " & @CRLF & _
"NEW YORK, NY 11111-1111 " & @CRLF & _
" " & @CRLF & _
" " & @CRLF & _
"SOME RANDOM COMMODITY " & @CRLF & _
"90 New York, NY 39,900.000LB $ " & @CRLF & _
"0.4925 " & @CRLF & _
"110 CLEVELAND, OH 39,900.000LB $ " & @CRLF & _
"0.4925 " & @CRLF & _
"..."
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