#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?:\s*<wp:postmeta>[^<]*(?:<(?!\/wp:postmeta>)[^<]*)*<\/wp:postmeta>)+"
Local $sString = "<item>" & @CRLF & _
" //Start of find" & @CRLF & _
"" & @CRLF & _
" <wp:postmeta>" & @CRLF & _
" <wp:meta_key><![CDATA[_edit_last]]></wp:meta_key>" & @CRLF & _
" <wp:meta_value><![CDATA[3]]></wp:meta_value>" & @CRLF & _
" </wp:postmeta>" & @CRLF & _
" <wp:postmeta>" & @CRLF & _
" <wp:meta_key><![CDATA[_thumbnail_id]]></wp:meta_key>" & @CRLF & _
" <wp:meta_value><![CDATA[51833]]></wp:meta_value>" & @CRLF & _
" </wp:postmeta>" & @CRLF & _
" <wp:postmeta>" & @CRLF & _
" <wp:meta_key><![CDATA[snapEdIT]]></wp:meta_key>" & @CRLF & _
" <wp:meta_value><![CDATA[1]]></wp:meta_value>" & @CRLF & _
" </wp:postmeta>" & @CRLF & _
"" & @CRLF & _
" // End of find using Notepad++" & @CRLF & _
"</item>" & @CRLF & _
"<item>" & @CRLF & _
" //Start of find" & @CRLF & _
"" & @CRLF & _
" <wp:postmeta>" & @CRLF & _
" <wp:meta_key><![CDATA[_edit_last]]></wp:meta_key>" & @CRLF & _
" <wp:meta_value><![CDATA[3]]></wp:meta_value>" & @CRLF & _
" </wp:postmeta>" & @CRLF & _
" <wp:postmeta>" & @CRLF & _
" <wp:meta_key><![CDATA[_thumbnail_id]]></wp:meta_key>" & @CRLF & _
" <wp:meta_value><![CDATA[51425]]></wp:meta_value>" & @CRLF & _
" </wp:postmeta>" & @CRLF & _
"" & @CRLF & _
" // End of find using Notepad++" & @CRLF & _
"</item>"
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