#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mi)^(.{20})[^.]{4,}(.*)$"
Local $sString = "1.1234567890.ab" & @CRLF & _
"2.123456789012345678901.ab" & @CRLF & _
"3.1234567890123456789012.ab" & @CRLF & _
"4.12345678901234567890123.ab" & @CRLF & _
"5.123456789012345678901234.ab" & @CRLF & _
"6.1234567890123456789012345.ab" & @CRLF & _
"7.12345678901234567890123456.ab" & @CRLF & _
"8.123456789012345678901234567890.ab" & @CRLF & _
"9.123456789012345678901234567890.1234567890123456.7890.ab" & @CRLF & _
"0.123456789012345678901234567890.12345678901.234567890....abcdef012345" & @CRLF & _
" 12345678901234567890123456789012345678901234567890"
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