#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?is)<w:body>.*(<w:p>(.*)<\/w:p>).*<\/w:body>"
Local $sString = "<w:body>" & @CRLF & _
"<w:body>" & @CRLF & _
" <w:p>" & @CRLF & _
" <w:pPr>" & @CRLF & _
" <w:pStyle w:val="Style19"/>" & @CRLF & _
" <w:jc w:val="center"/>" & @CRLF & _
" </w:pPr>" & @CRLF & _
" <w:r>" & @CRLF & _
" <w:rPr>" & @CRLF & _
" <w:b/>" & @CRLF & _
" <w:bCs/>" & @CRLF & _
" <w:i/>" & @CRLF & _
" <w:iCs/>" & @CRLF & _
" <w:sz w:val="144"/>" & @CRLF & _
" <w:szCs w:val="144"/>" & @CRLF & _
" <w:lang w:val="en-US"/>" & @CRLF & _
" </w:rPr>" & @CRLF & _
" <w:t>ONE!</w:t>" & @CRLF & _
" <w:br/>" & @CRLF & _
" <w:t xml:space="preserve"> {NUM}</w:t>" & @CRLF & _
" </w:r>" & @CRLF & _
" <w:r></w:r>" & @CRLF & _
" </w:p>" & @CRLF & _
"</w:body>"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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