#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "[A-Z]+(?:[[:punct:]][A-Z]+)*(?=\s+application)"
Local $sString = "Conversion routine for the NYC.GENX application. - should show 'NYC.GENX'" & @CRLF & _
"Conversion routine for the CAP-GENY application. - should show 'CAP-GENY'" & @CRLF & _
"Conversion routine for the NNUAT_CHECK application. - should show 'NNUAT_CHECK'" & @CRLF & _
"Created on 1/1/14 11:40 AM for RUN_SCRIPT application. - should show 'NNUAT_CHECK'" & @CRLF & _
"Event created on 2/2/14 12:29 PM for the STOP_SERVER application. - should show 'STOP_SERVER'"
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