#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?=\[)[a-zA-Z\W\s\n\d]+(?=\])."
Local $sString = "{" & @CRLF & _
"“documents”: [" & @CRLF & _
"{" & @CRLF & _
"“workerName”: “some name”," & @CRLF & _
"“fuelCardId”: "443345 "," & @CRLF & _
"“fuelLimit”: 120," & @CRLF & _
"“documentID”: “75fb1ba5-1aef”" & @CRLF & _
"}," & @CRLF & _
"{" & @CRLF & _
"“workerName”: “some name”," & @CRLF & _
"“fuelCardId”: "4534564 "," & @CRLF & _
"“fuelLimit”: 360," & @CRLF & _
"“documentID”: “629e0056-7235”" & @CRLF & _
"}," & @CRLF & _
"{" & @CRLF & _
"“workerName”: “some name”," & @CRLF & _
"“fuelCardId”: "4564564 "," & @CRLF & _
"“fuelLimit”: 899.9," & @CRLF & _
"“documentID”: “3444bda1-d893”" & @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