#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^([a-f\d]{1,4}:){7}[a-f\d]{1,4}$"
Local $sString = "1050:1000:1000:a000:5:600:300c:326b" & @CRLF & _
"1050:1000:2000:ab00:5:600:300c:326a" & @CRLF & _
"1050:1000:3000:abc0:5:600:300c:326c" & @CRLF & _
"1051:1000:4000:abcd:5:600:300c:326b" & @CRLF & _
"1050:0:0:0:5:600:300c:326b" & @CRLF & _
"1050:0:0:0:5:600:300c:326a" & @CRLF & _
"1050:0:0:0:5:600:300c:326c" & @CRLF & _
"1051:0:0:0:5:600:300c:326b" & @CRLF & _
"1050:10:0:0:5:600:300c:326b" & @CRLF & _
"1050:10:0:0:5:600:300c:326a" & @CRLF & _
"1050:10:0:0:5:600:300c:326c" & @CRLF & _
"1051:10:0:0:5:600:300c:326b" & @CRLF & _
"1050:10:0:0:15:600:300c:326b" & @CRLF & _
"1050:10:0:10:5:600:300c:326a" & @CRLF & _
"1050:10:10:0:5:600:300c:326c" & @CRLF & _
"1051:110:0:0:5:600:300c:326b" & @CRLF & _
"" & @CRLF & _
"1050:10:0:0:15:600:300c:326k" & @CRLF & _
"1050:10:0:0:15:600:300c:326g" & @CRLF & _
"1050:10:0:0:15:600:300c:326h" & @CRLF & _
"1050:10:0:0:15:600:300c:326i" & @CRLF & _
"not an ip address" & @CRLF & _
"not an ipv4 Address" & @CRLF & _
"Not an IPv5 Address"
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