#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(^S[A-Z]*\ [0-9\.]*$)"
Local $sString = "Aokia How doers" & @CRLF & _
"getmore done." & @CRLF & _
"9615 DIAMOND CENTER DRIVE" & @CRLF & _
"MENTOR, OH 44060 (440)357-0428" & @CRLF & _
"3815 00061 42905 05/01/22 01:57PM" & @CRLF & _
"SALE SELF CHECKOUT" & @CRLF & _
"037155808113 DRAIN CRT <A> 15.88" & @CRLF & _
"CHROME FINISH PLASTIC TUB STOPPER" & @CRLF & _
"SUBTOTAL 15.88" & @CRLF & _
"SALES TAX 1.15" & @CRLF & _
"TOTAL $17.03" & @CRLF & _
"XXXXXXXXXXXX4651 DEBIT" & @CRLF & _
"USD$17.03" & @CRLF & _
"AUTH CODE 001059" & @CRLF & _
"Chip Read Verified By PIN" & @CRLF & _
"AID A0000000042203 US Debit" & @CRLF & _
"3815 05/01/22 01:57 PM" & @CRLF & _
"3815 61 42905 05/01/2022 9250" & @CRLF & _
"RETURN POLICY DEFINITIONS" & @CRLF & _
"POLICY ID DAYS POLICY EXPIRES ON" & @CRLF & _
"A 1 90 07/30/2022" & @CRLF & _
"****" & @CRLF & _
"DID WE NAIL IT?" & @CRLF & _
"Take a short survey for a chance TO WIN" & @CRLF & _
"A$5,000 HOME DEPOT GIFT CARD" & @CRLF & _
"Opine en espaƱol" & @CRLF & _
"www.homedepot.com/survey" & @CRLF & _
"User ID: H88 89914 86160" & @CRLF & _
"PASSWORD: 22251 86099" & @CRLF & _
"Entries must be completed within 14 days" & @CRLF & _
"of purchase. Entrants must be 18 or" & @CRLF & _
"older to enter. See complete rules on" & @CRLF & _
"website. No purchase necessary."
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