#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^[A|C][1-9|A-HJ-PR-UW-Y][0-9][1-9|A-C][1-9|A-HJ-PR-UW-Y][0-9|A-HJ-PR-UW-Y]{3}[A-HJ-PR-UW-Y]{2}"
Local $sString = "A131K062CE04" & @CRLF & _
"A131K062CA04" & @CRLF & _
"A131K062CA" & @CRLF & _
"A131K062CE" & @CRLF & _
"A131K062CE" & @CRLF & _
"AZ31K062CE04" & @CRLF & _
"A136P099BH" & @CRLF & _
"A136Q09YBK " & @CRLF & _
"A136S02QCE" & @CRLF & _
"A136R09QAY" & @CRLF & _
"A136F04QBV" & @CRLF & _
"A136F08QAB" & @CRLF & _
"C136Q03UAU" & @CRLF & _
"A136D05BCG" & @CRLF & _
"A136B041AQ"
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