#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?i)Store number – ([\d\D]*)\n.*StreetA – ([\d\D]*)\n.*City – ([\d\D]*)\n.*State_id – ([\d\D]*)\n.*Postal Code – ([\d\D]*)\n.*Store Name – ([\d\D]*)\n.*Phone Number – ([\d\D]*)\n.*Tax Rates.*\n.*Tax table 1 – ([\d\D]*)\n.*Tax table 2 – ([\d\D]*)\n.*Tax table 3 – ([\d\D]*)\n.*Tax table 4 – ([\d\D]*)\n.*Tax table 5 – ([\d\D]*)\n.*Artistree vendor – ([\d\D]*)\n.*Store Group – ([\d\D]*)\n.*Store Zone number – ([\d\D]*)"
Local $sString = "FP Team," & @CRLF & _
"" & @CRLF & _
"Please install the Live database for store 1384. The updates have been completed." & @CRLF & _
"" & @CRLF & _
"• Store number – 1384" & @CRLF & _
"• StreetA – 1275 York Rd, Ste 21A" & @CRLF & _
"• City – Gettysburg" & @CRLF & _
"• State_id – PA" & @CRLF & _
"• Postal Code – 17325-7565" & @CRLF & _
"• Store Name – Gettysburg, PA" & @CRLF & _
"• Phone Number – (717) 420-8200" & @CRLF & _
"• Tax Rates" & @CRLF & _
" o Tax table 1 – 6.0000%" & @CRLF & _
" o Tax table 2 – 0.0000%" & @CRLF & _
" o Tax table 3 – 0.0000%" & @CRLF & _
" o Tax table 4 – 0.0000%" & @CRLF & _
" o Tax table 5 – N/A" & @CRLF & _
"• Artistree vendor – Kernersville" & @CRLF & _
"• Store Group – US.201308" & @CRLF & _
"• Store Zone number – 2030"
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