#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?ms)LEVEL:\s+(?<LEVEL>.*)PID\s+:\s(?<PID>\d+)\s+TID\s:\s+(?<TID>\d+)\s+PROC\s+:\s+(?<PROC>\w+)\s+\d+\s+INSTANCE:\s+(?<INSTANCE>\w+)\s+NODE\s+:\s+(?<NODE>\d+)\s+DB\s+:\s+(?<DB>\w+)\s+APPHDL\s+:\s+(?<APPHDL>[^ ]+)\s+APPID:\s+(?<APPID>[^ ]+)UOWID\s+:\s+(?<UOWID>\d+)\s+ACTID:\s+(?<ACTID>\d+)\s+AUTHID\s+:\s+\w+\s+HOSTNAME:\s+(?<HOSTNAME>[^ ]+)\s+EDUID\s+:\s+(?<EDUID>\d+)\s+EDUNAME:\s+(?<EDUNAME>.*)\s+FUNCTION:\s+(?<FUNCTION>\w+)"
Local $sString = "2020-01-27-15.00.10.349880-480 I930031A600 LEVEL: Error" & @CRLF & _
"PID : 30868490 TID : 180042 PROC : db2sysc 0" & @CRLF & _
"INSTANCE: db2prd2 NODE : 000 DB : PRODDW_2" & @CRLF & _
"APPHDL : 0-55088 APPID: 170.2.78.74.45949.200127223832" & @CRLF & _
"UOWID : 101 ACTID: 1" & @CRLF & _
"AUTHID : DWFLDREP HOSTNAME: db2udb04.us164.corpintra.net" & @CRLF & _
"EDUID : 180042 EDUNAME: db2agnts (PRODDW_2) 0" & @CRLF & _
"FUNCTION: DB2 UDB, runtime interpreter, sqlrisrt, probe:3312" & @CRLF & _
"DATA #2 : Hexdump, 4 bytes" & @CRLF & _
"0x0A000000A83FD4C4 : 800F 0003 ...."
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