#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)Current File:\s*(\S+\.txt).*Old File:\s*(\S+\.txt)[\s\S]*?(?=-{4,})"
Local $sString = "Current File: week-28\gcweb.txt (=>) ########## Old File: week-27\gcweb.txt (<=)" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"2019-07-21 13:20:42 ip-172-17-3-71=>" & @CRLF & _
"2019-07-17 13:27:12 ip-172-17-3-71<=" & @CRLF & _
"--------------------------------------------------" & @CRLF & _
"--------------------------------------------------" & @CRLF & _
"Current File: week-28\gcckup.txt (=>) ########## Old File: week-27\gcckup.txt (<=)" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"2019-07-21 13:20:46 ip-172-17-2-101=>" & @CRLF & _
"2019-07-17 13:27:14 ip-172-17-2-101<=" & @CRLF & _
"--------------------------------------------------" & @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