#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\\starttable[\s\S]*?\HL[\s\S]*?\HL"
Local $sString = "\starttable[|lp(0.08\textwidth)|lp(0.35\textwidth)|lp(0.48\textwidth)|lp(0.08\textwidth)|]" & @CRLF & _
"\HL" & @CRLF & _
"\NC Req. Id" & @CRLF & _
"\NC Description" & @CRLF & _
"\NC Test Scenario" & @CRLF & _
"\NC Result" & @CRLF & _
"\NC\AR" & @CRLF & _
"\HL" & @CRLF & _
"\NC TAF-89" & @CRLF & _
"" & @CRLF & _
"\NC Trigger test start - from jig" & @CRLF & _
"" & @CRLF & _
"\NC " & @CRLF & _
"\NC Unavailable" & @CRLF & _
"" & @CRLF & _
"\NC\AR" & @CRLF & _
"\NC TAF-88" & @CRLF & _
"" & @CRLF & _
"\NC Trigger test start - using scanner" & @CRLF & _
"" & @CRLF & _
"\NC " & @CRLF & _
"\NC Unavailable" & @CRLF & _
"" & @CRLF & _
"\NC\AR" & @CRLF & _
"\HL"
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