#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "to score exactly \d[ or \d]? goals[^\n]*"
Local $sString = "Subject:" & @CRLF & _
" Security ID: S-1-5-21-3368353891-1012177287-890106238-22451" & @CRLF & _
" Account Name: ChamaraKer" & @CRLF & _
" Account Domain: JIC" & @CRLF & _
" Logon ID: 0x1fffb" & @CRLF & _
"" & @CRLF & _
"Object:" & @CRLF & _
" Object Server: Security" & @CRLF & _
" Object Type: File" & @CRLF & _
" Object Name: D:\ApacheTomcat\apache-tomcat-6.0.36\logs\localhost.2013-07-01.log" & @CRLF & _
" Handle ID: 0x11dc"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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