#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?i)(?:\b(?:your|amazon\.com|shipped)\b.*){3}"
Local $sString = "Your Amazon.com order has shipped (#114-7286434-0549003)" & @CRLF & _
"" & @CRLF & _
"Fwd: Your Amazon.com order of "Diva Ring Light Nebula 18..." has shipped!" & @CRLF & _
"" & @CRLF & _
"Your Amazon.com order has shipped (#114-7286434-0549003)" & @CRLF & _
"" & @CRLF & _
"Your Amazon.com order has shipped" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Fwd: Your sdjcns order has deleted" & @CRLF & _
"" & @CRLF & _
"Fwd: Your amazon order is cancelled" & @CRLF & _
"" & @CRLF & _
"Your Amazon.in order (#171-8110001-7994703) of "Prestige Electric Kettle..." has been dispatched!" & @CRLF & _
"" & @CRLF & _
"Your Amazon.in order #171-8110001-7994703 has been delivered" & @CRLF & _
"" & @CRLF & _
"Your Amazon.in order #171-8110001-7994703 is out for delivery" & @CRLF & _
"" & @CRLF & _
"Your Amazon.in order #171-8110001-7994703 has been shipped" & @CRLF & _
"" & @CRLF & _
"Fwd: Your Amazon.com order of "Diva Ring Light Nebula 18..." has shipped!"
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