#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?::(\d|[1-9]\d{1,3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$"
Local $sString = "188.80.74.150" & @CRLF & _
"169.157.62.216" & @CRLF & _
"81.46.96.107" & @CRLF & _
"44.119.14.70" & @CRLF & _
"161.17.234.246" & @CRLF & _
"205.62.196.10" & @CRLF & _
"213.64.103.147" & @CRLF & _
"78.199.17.216:34" & @CRLF & _
"78.165.189.94:0" & @CRLF & _
"205.62.196.10:5656" & @CRLF & _
"57.112.40.255:65536"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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