#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m) *"(\w+)": "?(\w*)"?,"
Local $sString = " "Status": 1," & @CRLF & _
" "OrderBy": 5," & @CRLF & _
" "ParentID": 0," & @CRLF & _
" "SortOrderBy": 5," & @CRLF & _
" "Description": ""," & @CRLF & _
" "level": 1," & @CRLF & _
" "ProjectID": 1," & @CRLF & _
" "ParentIDStr": "0"," & @CRLF & _
" "leaf": false," & @CRLF & _
" "type": "building"," & @CRLF & _
" "Name": "小浪底水利枢纽"," & @CRLF & _
" "Remark": ""," & @CRLF & _
" "SiteNames": "小浪底水利枢纽"," & @CRLF & _
" "expanded": true," & @CRLF & _
" "PLevel": 1," & @CRLF & _
" "ID": 1," & @CRLF & _
" "id": "1-1"," & @CRLF & _
" "text": "小浪底水利枢纽"," & @CRLF & _
" "iconCls": "buildingCls"," & @CRLF & _
" "nodeID": 1,"
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