#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\{(?:[^\{\}]|\{(?:[^\{\}]|\{(?:[^\{\}]|\{(?:[^\{\}]|\{(?:[^\{\}]|\{(?:[^\{\}]|\{(?:[^\{\}]|\{(?:[^\{\}]|\{(?:[^\{\}]|\{(?:[^\{\}]|w+)*\})*\})*\})*\})*\})*\})*\})*\})*\})*\}"
Local $sString = "2016-03-21 21:36:20.878 INFO 17512 --- [main] This is going well." & @CRLF & _
"ok: [goingwell] => {" & @CRLF & _
" "localresult": {" & @CRLF & _
" "aa":"bb"," & @CRLF & _
" "aaa":"bbb"" & @CRLF & _
" }" & @CRLF & _
"}" & @CRLF & _
"2016-03-21 21:36:31.172 INFO 17513 --- [main] Continue logging ..." & @CRLF & _
"2016-03-21 21:36:42.568 INFO 17514 --- [main] With more json strings..." & @CRLF & _
"ok: [xxa123] => {" & @CRLF & _
" "axaxaxa": {" & @CRLF & _
" "aada":"bb"," & @CRLF & _
" "aaadfa":"bbb"" & @CRLF & _
" }" & @CRLF & _
"}" & @CRLF & _
"2016-03-21 21:36:43.132 INFO 17515 --- [main] Continue logging ..." & @CRLF & _
"2016-03-21 21:36:45.428 INFO 17516 --- [main] With more json strings..." & @CRLF & _
"ok: [xxa123] => {" & @CRLF & _
" "ccc": {" & @CRLF & _
" "ddd": {" & @CRLF & _
" "eee": {" & @CRLF & _
" "fff": "ggg"" & @CRLF & _
" }" & @CRLF & _
" }" & @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