#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^([^0-9]*\b(([1-9]|1[0-9]|22|2[4-9]|[3-9][0-9]|1[0-2][0-9]|13[0-6]|1[4-9][0-9]|[2-9][0-9][0-8]|[1-9][0-9]{3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])\b[^0-9]*)*$)"
Local $sString = "56;45;5623;67;21;68" & @CRLF & _
"45;568;56564;68;254;136" & @CRLF & _
"8080;8958;368;65;80;443;22" & @CRLF & _
"8080;22;140" & @CRLF & _
"139;852;21;80" & @CRLF & _
"65;80;135" & @CRLF & _
"65;139" & @CRLF & _
"54;98;35;65;2 ;45" & @CRLF & _
""
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