#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "[ ]*List of \d+ base pairs([\s\S]*?)(?=\*{5,})"
Local $sString = " bla bla bla " & @CRLF & _
" bla some on wanted text...." & @CRLF & _
"" & @CRLF & _
"****************************************************************************" & @CRLF & _
"List of 12 base pairs" & @CRLF & _
" nt1 nt2 bp name Saenger LW DSSR" & @CRLF & _
" 1 Q.C0 Q.G22 C-G WC 19-XIX cWW cW-W" & @CRLF & _
" 2 Q.C1 Q.G21 C-G WC 19-XIX cWW cW-W" & @CRLF & _
" 3 Q.U2 Q.A20 U-A WC 20-XX cWW cW-W" & @CRLF & _
"" & @CRLF & _
"****************************************************************************" & @CRLF & _
"another unwanted text ..." & @CRLF & _
"another unwanted text "
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