#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m) *"(\w+)": ("?[^,"]*"?)[,|,\n]"
Local $sString = " "ID": 26," & @CRLF & _
" "MenuName": "测点数据管理"," & @CRLF & _
" "PLevel": 2," & @CRLF & _
" "Url": "pages/datamanage/sensor_group/index.html"," & @CRLF & _
" "NewTab": 0," & @CRLF & _
" "IconName": ""," & @CRLF & _
" "ParentID": 23," & @CRLF & _
" "OrderBy": 5," & @CRLF & _
" "Remark": ""," & @CRLF & _
" "MenuType": 2," & @CRLF & _
" "RoleID": 1," & @CRLF & _
" "PagePower": 1," & @CRLF & _
" "MenuID": "26"," & @CRLF & _
" "ButtonName": "添加数据"," & @CRLF & _
" "ButtonID": "addSensorOrgData"," & @CRLF & _
" "FunctionName": "addSensorOrgDataByID"," & @CRLF & _
" "FunctionController": "sensordata"," & @CRLF & _
" "OrderBy": 5," & @CRLF & _
" "RoleID": 1," & @CRLF & _
" "MenuType": 3," & @CRLF & _
" "MenuID": 1," & @CRLF & _
" "ParentID": 26," & @CRLF & _
" "MenuName": "添加数据"," & @CRLF & _
" "PagePower": 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