#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)\bWARN\h+.*(?:\R(?!.*\h(?:WARN|INFO|OK)\h).*)*"
Local $sString = "[C] L1250 WARN k2 bw34 Flex - Sockets:<16>, ThreadsPerCore:<1>" & @CRLF & _
"[C] L1250 WARN For abcd (analytical and transactional workloads). For 12s Systems and above, should be" & @CRLF & _
" disabled." & @CRLF & _
"[C] L1250 INFO For abcd (analytical workloads), Hyperthreading should be enabled , 8s, 12s, 14d, 34t" & @CRLF & _
" d above." & @CRLF & _
"[C] L1250 WARN Intel's Hyperthreading on 18+ Socket system disabled. Should be disabled urgently" & @CRLF & _
" fix it!" & @CRLF & _
"[C] L1300 OK CPU governors set as recommended" & @CRLF & _
"[C] L1250 WARN Intel's Hyperthreading on 8+ Socket system disabled."
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