#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(^\d{4}(-\d{2}){2}([^|]+\|){3})([\s\S]*?)\n*(?=^\d{4}.*?(?:[^|\n]+\|){3}|\z)"
Local $sString = "2015-03-03 19:30:47.2725|INFO|MyApp|This is a single line log message." & @CRLF & _
"" & @CRLF & _
"2015-03-03 19:31:29.1209|INFO|MyApp|This log message has multiple" & @CRLF & _
"lines with" & @CRLF & _
"2015-03-03" & @CRLF & _
"a date in it." & @CRLF & _
"" & @CRLF & _
"2015-03-03 19:32:50.1106|INFO|MyApp|This log message has" & @CRLF & _
"multiple lines" & @CRLF & _
"but just text only." & @CRLF & _
"" & @CRLF & _
"2015-03-03 19:33:20.2683|ERROR|MyApp|This log message has multiple lines but" & @CRLF & _
"also some confusing text like" & @CRLF & _
"2015-03-03 19:33:20.2683|ERROR| which should" & @CRLF & _
"still be a valid log message."
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