#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<=Amount:\s?\$)([0-9,]+\.\d{2})|(?<=Date:\s?)(\d{2}/\d{2}/\d{4})|(?<=Invoice:\s?)(\d+)|(?<=Billing Account Name:\s?)([\w\s]+)"
Local $sString = "Dear Valued AdRoll Customer," & @CRLF & _
"" & @CRLF & _
"Your payment for invoice #5925702 has been processed. Please see below for additional details." & @CRLF & _
"" & @CRLF & _
"Learn more about your billing history." & @CRLF & _
"" & @CRLF & _
"-- Transaction Details --" & @CRLF & _
"Amount: $450.42" & @CRLF & _
"Date: 10/15/2024" & @CRLF & _
"Invoice: 5925702" & @CRLF & _
"Billing Account Name: RRL Exhbits" & @CRLF & _
"Profile(s):" & @CRLF & _
"Reagan Library" & @CRLF & _
"If you have any questions, please contact support@adroll.com." & @CRLF & _
"" & @CRLF & _
"Download Invoice PDF" & @CRLF & _
"" & @CRLF & _
"Log in to AdRoll" & @CRLF & _
"" & @CRLF & _
"---" & @CRLF & _
"If you have any questions, don’t hesitate to contact our Support team or chat with us live."
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