#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?x)Required\sDate" & @CRLF & _
"(?<Line>__" & @CRLF & _
"(?<PartNo1>[a-zA-Z0-9-]*)\s" & @CRLF & _
"(?<OrderQuantity1>[0-9.]+)" & @CRLF & _
"__" & @CRLF & _
"(?<PartNo2>[a-zA-Z0-9-]*)\s" & @CRLF & _
"(?<OrderQuantity2>[0-9.]+)" & @CRLF & _
")*"
Local $sString = "__Required Date__40X0343 1.00__C734X77G 2.00__Net Order:__Sales Tax:__Freight:__Order Total:__0.00 __0.00 __5,328.50 __5,328.50 __or by fax " & @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