#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "([A-Z]{3})(20\d{2})(\d{9})\b"
Local $sString = "PRK2017000003021" & @CRLF & _
"PRK2017000003017" & @CRLF & _
"AAA2017000000000" & @CRLF & _
"aaa2017956639163" & @CRLF & _
"Aaa2017956639163" & @CRLF & _
"AAa2017956639163" & @CRLF & _
"aAA2017956639163" & @CRLF & _
"DMY2017817027421" & @CRLF & _
"PRK2017000003022" & @CRLF & _
"PRK2017000003023" & @CRLF & _
"PRN2017000000001" & @CRLF & _
"IHR2018000000001" & @CRLF & _
"IHR2018000000002" & @CRLF & _
"IHR2018000000003a" & @CRLF & _
"DMY20180112150945"
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