#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\"LogDate\":\s+\"(?<LogDate>[^\"]+)"
Local $sString = "{ [-]" & @CRLF & _
" event: INFO 2022-09-23 11:49:59,033 [[MuleRuntime].uber.01: [papi-ust-email-notification-v1-uw-qa].get:\ping:Router.CPU_LITE @6c1fb7] org.mule.runtime.core.internal.processor.LoggerMessageProcessor: {" & @CRLF & _
" "LogDate": "09/23/2022 16:11:13.932"," & @CRLF & _
" "LogNo": "99"," & @CRLF & _
" "LogLevel": "INFO"," & @CRLF & _
" "LogType": "Process Level"," & @CRLF & _
" "LogMessage": "Splunk anypoint log"," & @CRLF & _
" "TimeTaken": "0:00:12.628"," & @CRLF & _
" "ProcessName": "AnypointSplunkTest"," & @CRLF & _
" "TaskName": "AnypointTest"," & @CRLF & _
" "RPAEnvironment": "DEV"," & @CRLF & _
" "LogId": "002308900.20250824210419999"," & @CRLF & _
" "MachineName": "abc-xyz-efg"," & @CRLF & _
" "User": "name.first"" & @CRLF & _
"}" & @CRLF & _
" metaData: { [+]" & @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