#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?s)(?<=^.*?[?!.].*?[?!.]).+"
Local $sString = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque faucibus justo id metus fringilla, nec bibendum sem vulputate. Vivamus nec ex ut risus luctus tincidunt ac et lacus. Mauris molestie laoreet tortor non fermentum. Vestibulum tincidunt nulla quis feugiat pharetra. Donec non posuere purus. Donec mattis convallis augue, ut semper justo varius vel. Proin tristique dui ac elit tempor molestie. Nulla nec ultricies nunc."
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