#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(Location\s*:\s*)([a-zA-Z0-9:]*)\s*(Model\s*:\s*)([a-zA-Z0-9]*)"
Local $sString = "SSD Firmware Check 09/08/2020 02:49:05" & @CRLF & _
"==================================================================" & @CRLF & _
"*** Reminder: This script queries the HPE Smart Array controller through the iLO and thus will only detect drives attached to HPE Smart Array controllers. Drives in external storage enclosures where the enclosures have their own storage controller that manage their installed drives will not be detected. For these situations, further analysis will be required to confirm whether affected drives are installed. Review the iLO GUI ‘System Information -> Storage' tab ---> only drives listed on that page will be evaluated by this script. ***" & @CRLF & _
"Server Info:" & @CRLF & _
"==================================================================" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"SerialNumber : CZJ911084W" & @CRLF & _
"ServerName : " & @CRLF & _
"iLO HostName : ILOCZJ911084W" & @CRLF & _
"ServerModel : ProLiant DL360 Gen10" & @CRLF & _
"iLO URL : " & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"The following discovered drives need a firmware update to Version HPD8 before PowerOnHours exceed 32,000 hours:" & @CRLF & _
"==================================================================" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Location : 1I:1:3" & @CRLF & _
"Model : VK003840JWSST" & @CRLF & _
"PowerOnHours : 10242" & @CRLF & _
"SerialNumber : S48XNF0M102213" & @CRLF & _
"FirmwareVersion : HPD1" & @CRLF & _
"Failure : APPROACHING" & @CRLF & _
"CurrentOperatingMode : Mixed" & @CRLF & _
"SmartArrayModel : HPE Smart Array P816i-a SR Gen10"
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