#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^([AC-FHKNPRTV-Y]\d{2}|D6W)\s[0-9AC-FHKNPRTV-Y]{4}$"
Local $sString = "D6W 1234" & @CRLF & _
"A23 0984" & @CRLF & _
"D00 AV92" & @CRLF & _
"Y63 1FHK" & @CRLF & _
"A00 0000" & @CRLF & _
"D44 N4X4" & @CRLF & _
"A65 F4E2" & @CRLF & _
"D6W FNT4" & @CRLF & _
"T37 F8HK" & @CRLF & _
"D14 N2Fz" & @CRLF & _
"a65 f4e2" & @CRLF & _
"D6W FNTO"
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