#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^[0-9A-Fa-f]{1,2}(?:[:-][0-9A-Fa-f]{0,2}){0,5}$"
Local $sString = "93:31:13:E1:D3:1A:" & @CRLF & _
"93:31:13:E1:D3:1A" & @CRLF & _
"93:31:13:E1:D3:1" & @CRLF & _
"93:31:13:E1:D3:" & @CRLF & _
"93:31:13:E1:D3" & @CRLF & _
"93:31:13:E1:D" & @CRLF & _
"93:31:13:E1:" & @CRLF & _
"93:31:13:E1" & @CRLF & _
"93:31:13:E" & @CRLF & _
"93:31:13:" & @CRLF & _
"93:31:13" & @CRLF & _
"93:31:1" & @CRLF & _
"93:31:" & @CRLF & _
"93:31" & @CRLF & _
"93:3" & @CRLF & _
"93:" & @CRLF & _
"93" & @CRLF & _
"9" & @CRLF & _
"3E-EB-47-8" & @CRLF & _
"84:0C:" & @CRLF & _
"" & @CRLF & _
"3E:EB-47-8" & @CRLF & _
"" & @CRLF & _
"6B-90-8Y-31-D1-7K" & @CRLF & _
"37-4H-31"
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