#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?s)<P .*?#0007'>\s*(.*?)\s*<\/SPAN.*?<\/P>"
Local $sString = "Some random stuff not part of the matched substring...<P class=MsoNormal" & @CRLF & _
"style="MARGIN-BOTTOM: 0pt; LINE-HEIGHT: normal; TEXT-AUTOSPACE: ; mso-pagination: none; mso-layout-grid-align: none"><B><SPAN" & @CRLF & _
"lang=de" & @CRLF & _
"style='FONT-SIZE: 33pt; FONT-FAMILY: "TimesNewRoman,Bold","serif"; mso-bidi-font-family: "TimesNewRoman,Bold"; mso-ansi-language: #0007'>Teil" & @CRLF & _
"II<o:p></o:p></SPAN></B></P>and even more blub"
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