#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^(?!.{15}$)(?!.{17}$)[0-9]{13,20}$"
Local $sString = "1" & @CRLF & _
"22" & @CRLF & _
"333" & @CRLF & _
"4444" & @CRLF & _
"55555" & @CRLF & _
"666666" & @CRLF & _
"7777777" & @CRLF & _
"88888888" & @CRLF & _
"999999999" & @CRLF & _
"1010101010" & @CRLF & _
"11111111111" & @CRLF & _
"121212121212" & @CRLF & _
"1313131313131" & @CRLF & _
"14141414141414" & @CRLF & _
"151515151515151" & @CRLF & _
"1616161616161616" & @CRLF & _
"17171717171717171" & @CRLF & _
"181818181818181818" & @CRLF & _
"1919191919191919191" & @CRLF & _
"20202020202020202020" & @CRLF & _
"212121212121212121212" & @CRLF & _
"2222222222222222222222" & @CRLF & _
"23232323232323232323232" & @CRLF & _
"242424242424242424242424" & @CRLF & _
"2525252525252525252525252"
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