#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "[\n\r\s]*#{ListStart:ExtDocuments}[\n\r]([\w\n\r\s\<\>\#\{\}\/\-]*)#{ListEnd:ExtDocuments}[\n\r\s]*"
Local $sString = "<html>" & @CRLF & _
" <head>" & @CRLF & _
" <title>#{Subject}</title>" & @CRLF & _
" </head>" & @CRLF & _
" <body>" & @CRLF & _
" <div>StringTest: #{String}</div>" & @CRLF & _
" <div>IntTest: #{Int}</div>" & @CRLF & _
" <div>IntTest: #{INT}</div>" & @CRLF & _
" <div>IntTest: #{int}</div>" & @CRLF & _
" <div>IntTest: #{iNt}</div>" & @CRLF & _
"" & @CRLF & _
" #{ListStart:Documents}" & @CRLF & _
" <div>#{Value}</div>" & @CRLF & _
" #{ListEnd:Documents}" & @CRLF & _
"" & @CRLF & _
" #{ListStart:ExtDocuments}" & @CRLF & _
" <div>#{Id} - #{MeinWert}</div>" & @CRLF & _
" <div>#{Id} - #{MeinWert}</div>" & @CRLF & _
" #{ListEnd:ExtDocuments}" & @CRLF & _
"" & @CRLF & _
" </body>" & @CRLF & _
"</html>"
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