#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?:<w-block-content.*[\s\S]*?<div>)([\s\S]*?)(?:<\/div>((?!<\/div>))*[\s]*?<\/span>[\s\S]*?<\/w-block-content>)"
Local $sString = "</tr>" & @CRLF & _
" <td>" & @CRLF & _
" <div draggable="true" class="source master draggable-box wysiwyg-block" data-block-type="master" data-block-id="96e80afb-afa0-4e46-bfb7-34b80da76112" style="opacity: 1;">" & @CRLF & _
" <w-block-content data-block-content-id="96e80afb-afa0-4e46-bfb7-34b80da76112"><span class="source-block-tooltip">" & @CRLF & _
" <div>" & @CRLF & _
"" & @CRLF & _
"Další master<br><div><b>Master č. 2</b> </div><br>" & @CRLF & _
"" & @CRLF & _
" </div>" & @CRLF & _
" </span></w-block-content>" & @CRLF & _
" </div>" & @CRLF & _
" </td>" & @CRLF & _
" </tr>" & @CRLF & _
"</tr>" & @CRLF & _
" <td>" & @CRLF & _
" <div draggable="true" class="source master draggable-box wysiwyg-block" data-block-type="master" data-block-id="96e80afb-afa0-4e46-bfb7-34b80da76112" style="opacity: 1;">" & @CRLF & _
" <w-block-content data-block-content-id="96e80afb-afa0-4e46-bfb7-34b80da76112"><span class="source-block-tooltip">" & @CRLF & _
" <div>" & @CRLF & _
"" & @CRLF & _
"Další master<br><b>Master č. 2</b><br>" & @CRLF & _
" " & @CRLF & _
" </div>" & @CRLF & _
" </span></w-block-content>" & @CRLF & _
" </div>" & @CRLF & _
" </td>" & @CRLF & _
" </tr>" & @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