#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?im)Activate-Status(?!.*Ready)|Overall.*Status(?!.*Operable)|Operability(?!.*Operable)|Controller.*Status(?!.*Optimal)|Errors(?!.*0)|Dropped(?!.*0)|Discarded(?!.*0)|Bad(?!.*220)|Suspect(?!.*No)|Thresholded(?!.*0)|Visibility.(?!.*yes)|Thermal.*Status(?!.*OK)|HA.*(?!.*READY)"
Local $sString = "ID 20:" & @CRLF & _
" Location: G1" & @CRLF & _
" Presence: Equipped" & @CRLF & _
" Overall Status: Operable" & @CRLF & _
" Operability: Degraded" & @CRLF & _
" Visibility: foobar" & @CRLF & _
" Product Name: 16GB DDR3-1600-MHz RDIMM/PC3-12800/dual rank/1.35V" & @CRLF & _
" PID: " & @CRLF & _
" VID: V01" & @CRLF & _
" Vendor: 0x2C00" & @CRLF & _
" Vendor Description: Micron Technology, Inc." & @CRLF & _
" Vendor Part Number: " & @CRLF & _
" Vendor Serial (SN): " & @CRLF & _
" HW Revision: 0" & @CRLF & _
" Form Factor: DIMM" & @CRLF & _
" Type: DDR3" & @CRLF & _
" Thermal Status: FUBAR" & @CRLF & _
" Capacity (MB): 16384" & @CRLF & _
" Clock: 1600" & @CRLF & _
" Latency: 0.600000" & @CRLF & _
" Width: 64" & @CRLF & _
""
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