#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?ms)^(?=(.{0,1500}language[^\n]*\n[^\n]*\n[^\n]*))(?=(.{0,1500}experience[^\n]*\n[^\n]*\n[^\n]*))(?=(.{0,1500}acquire[^\n]*\n[^\n]*\n[^\n]*))"
Local $sString = "materials the in the case of language" & @CRLF & _
"what was taken further than assumed sort" & @CRLF & _
"of again though experiments but seems" & @CRLF & _
"obvious is that the basic elements" & @CRLF & _
"of language say concepts or words if" & @CRLF & _
"there's any difference between them" & @CRLF & _
"those must be primarily generated" & @CRLF & _
"internally their complexity and richness" & @CRLF & _
"is such that they can't possibly be" & @CRLF & _
"acquired from experience they were what" & @CRLF & _
"were called the common notions or innate" & @CRLF & _
"ideas formed by some internal generative" & @CRLF & _
"process that's structured in some" & @CRLF & _
"fashion this and there was a good but" & @CRLF & _
"about how this is done suggesting that" & @CRLF & _
"what's involved is you start with but" & @CRLF & _
"are now called gustave properties" & @CRLF & _
"notions of casual relation notions of" & @CRLF & _
"agency anthropomorphic perspectives all" & @CRLF & _
"familiar with the way we perceive and" & @CRLF & _
"think about the natural world" & @CRLF & _
"so you see you you talk about a comet as" & @CRLF & _
"aiming towards the Earth and fortunately" & @CRLF & _
""
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