#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?ms)Binding\s+Type:\s+0"
Local $sString = "LogName=Directory Service" & @CRLF & _
"SourceName=Microsoft-Windows-ActiveDirectory_DomainService" & @CRLF & _
"EventCode=2889" & @CRLF & _
"EventType=4" & @CRLF & _
"Type=Information" & @CRLF & _
"ComputerName=XXXXX" & @CRLF & _
"User=NOT_TRANSLATED" & @CRLF & _
"Sid=S-1-5-7" & @CRLF & _
"SidType=0" & @CRLF & _
"TaskCategory=LDAP Interface" & @CRLF & _
"OpCode=The operation completed successfully." & @CRLF & _
"RecordNumber=7362133" & @CRLF & _
"Keywords=Classic" & @CRLF & _
"Message=The following client performed a SASL (Negotiate/Kerberos/NTLM/Digest) LDAP bind without requesting signing (integrity verification), or performed a simple bind over a clear text (non-SSL/TLS-encrypted) LDAP connection." & @CRLF & _
"Client IP address:" & @CRLF & _
"1.1.11.1:5555" & @CRLF & _
"Identity the client attempted to authenticate as:" & @CRLF & _
"XXX\XXXX" & @CRLF & _
"Binding Type:" & @CRLF & _
"0"
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