#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)^\s*(\d{1,3})\s+([a-zA-z0-9-_]+\s?[a-zA-z0-9-_]+)\s+(0x[a-zA-Z0-9]{4})\s+(\d{3})\s+(\d{3})\s+(\d+)\s+([a-zA-z0-9-_]+\s?\w+)\s+(\w+)\s+-\s+(\d+)"
Local $sString = "ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE" & @CRLF & _
" 5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0" & @CRLF & _
" 9 Power_On_Hours 0x0032 096 096 000 Old_age Always - 19033" & @CRLF & _
" 12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 54" & @CRLF & _
"170 Unused_Rsvd_Blk_Ct_Chip 0x0032 100 100 010 Old_age Always - 0" & @CRLF & _
"171 Program_Fail_Count_Chip 0x0032 100 100 010 Old_age Always - 0" & @CRLF & _
"172 Erase_Fail_Count_Chip 0x0032 100 100 010 Old_age Always - 0" & @CRLF & _
"173 Wear_Leveling_Count 0x0033 090 090 005 Pre-fail Always - 121" & @CRLF & _
"174 Unexpect_Power_Loss_Ct 0x0032 099 099 000 Old_age Always - 12" & @CRLF & _
"178 Used_Rsvd_Blk_Cnt_Chip 0x0013 100 100 010 Pre-fail Always - 0" & @CRLF & _
"180 Unused_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 1618" & @CRLF & _
"184 End-to-End_Error 0x0033 100 100 097 Pre-fail Always - 0" & @CRLF & _
"187 Uncorrectable_Error_Cnt 0x0032 100 100 000 Old_age Always - 0" & @CRLF & _
"194 Temperature_Celsius 0x0032 059 055 000 Old_age Always - 41" & @CRLF & _
"199 CRC_Error_Count 0x003e 099 099 000 Old_age Always - 21" & @CRLF & _
"233 Media_Wearout_Indicator 0x0013 090 090 000 Pre-fail Always - 15085512" & @CRLF & _
"241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 19103" & @CRLF & _
"242 Total_LBAs_Read 0x0032 099 099 000 Old_age Always - 23403" & @CRLF & _
"249 NAND_Writes_1GiB 0x0032 099 099 000 Old_age Always - 61952"
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