#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<=TITLE)(?!\s*Direct Submission)[\S\s]*?(?=JOURNAL)"
Local $sString = " TITLE The Identification of Novel Diagnostic Marker Genes for the" & @CRLF & _
" Detection of Beer Spoiling Pediococcus damnosus Strains Using the" & @CRLF & _
" BlAst Diagnostic Gene findEr" & @CRLF & _
" JOURNAL PLoS One 11 (3), e0152747 (2016)" & @CRLF & _
" PUBMED 27028007" & @CRLF & _
" REMARK Publication Status: Online-Only" & @CRLF & _
"REFERENCE 2 (bases 1 to 462)" & @CRLF & _
" AUTHORS Behr,J., Geissler,A.J. and Vogel,R.F." & @CRLF & _
" TITLE Direct Submission" & @CRLF & _
" JOURNAL Submitted (04-AUG-2015) Technische Mikrobiologie, Technische" & @CRLF & _
" TITLE OtherDirect Submission" & @CRLF & _
" JOURNAL Submitted (04-AUG-2015) Technische Mikrobiologie, Technische"
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