#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\{\\rtf1\\ansi\\ansicpg1252(?:.|[\r\n]+)*\{\\\*\\listtable"
Local $sString = "{\rtf1\ansi\ansicpg1252" & @CRLF & _
"\deff0{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\froman\fcharset0 HELVETICA;}{\f2\froman\fcharset0 Arial;}{\f3\froman\fcharset0 unknown;}{\f4\froman\fcharset0 HELVETICA-BOLD;}{\f5\froman\fcharset0 Helvetica;}}" & @CRLF & _
"{\colortbl\red0\green0\blue0;\red255\green255\blue255;\red244\green245\blue255;\red254\green182\blue230;\red0\green0\blue255;}" & @CRLF & _
"{\stylesheet " & @CRLF & _
"{\style\s0 \ql\fi0\li0\ri0\f2\fs24\cf0 Normal;}" & @CRLF & _
"{\style\s3 \ql\fi0\li0\ri0\f2\fs26\b\cf0 heading 3;}" & @CRLF & _
"{\style\s2 \ql\fi0\li0\ri0\f2\fs28\b\i\cf0 heading 2;}" & @CRLF & _
"{\style\s1 \ql\fi0\li0\ri0\f2\fs32\b\cf0 heading 1;}" & @CRLF & _
"}" & @CRLF & _
"{\*\listtable" & @CRLF & _
"{\style\s0 \ql\fi0\li0\ri0\f2\fs24\cf0 Normal;}" & @CRLF & _
"{\style\s3 \ql\fi0\li0\ri0\f2\fs26\b\cf0 heading 3;}" & @CRLF & _
"{\style\s2 \ql\fi0\li0\ri0\f2\fs28\b\i\cf0 heading 2;}" & @CRLF & _
"{\style\s1 \ql\fi0\li0\ri0\f2\fs32\b\cf0 heading 1;}" & @CRLF & _
"}" & @CRLF & _
"{\*\listtable" & @CRLF & _
"}" & @CRLF & _
"{\*\listoverridetable" & @CRLF & _
"}" & @CRLF & _
"{\*\generator iText 2.1.2 (by lowagie.com)}" & @CRLF & _
"{\info}"
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