#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?u)<(\w+)[^>]*>(?>[\p{Z}\p{C}]|<br\b[^>]*>|&(?:(?:nb|thin|zwnb|e[nm])sp|zwnj|#xfeff|#xa0|#160|#65279);|(?R))*</\1>"
Local $sString = "<strong class="a b"><b></b> </strong>" & @CRLF & _
"<strong class="a b"> <br class="a b" /></strong>" & @CRLF & _
"<br class="a b" />" & @CRLF & _
"<strong class="a b"><br> " & @CRLF & _
" <strong>" & @CRLF & _
" <b><br /> </b>" & @CRLF & _
" </strong>" & @CRLF & _
"</strong>" & @CRLF & _
"abc" & @CRLF & _
"<strong class="a b"><br class="a b" /><br class="a b" /></strong>"
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