#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\[CDATA\[([^\]]+)(?![\s\S]*\[CDATA)"
Local $sString = "<?xml version='1.0' encoding='UTF-8'?>" & @CRLF & _
"<partial-response><changes><update id="layout:layoutLeft:treeForm:riverTree">" & @CRLF & _
"<![CDATA[<li id="layout:layoutLeft:treeForm:flussgebieteBaum:0_0_0" data-rowkey="0_0_0" " & @CRLF & _
"class="ui-treenode ui-treenode-parent river default" role="treeitem">" & @CRLF & _
"<span class="ui-treenode-content ui-tree-selectable" aria-expanded="false" aria-selected="false">" & @CRLF & _
"<span class="ui-tree-toggler ui-icon ui-icon-triangle-1-e"></span><span></span>" & @CRLF & _
"<span class="ui-treenode-label ui-corner-all"><span title="W">W</span></span>" & @CRLF & _
"<span class="hwims-markingSpan"></span></span><ul class="ui-treenode-children" style="display:none">" & @CRLF & _
"</ul></li>]]></update><update id="javax.faces.ViewState">" & @CRLF & _
"<![CDATA[5518082394550102028:7288540440023391844]]></update></changes></partial-response>"
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