#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "\s{2,3}(\d+)\|\s{8,9}(\w+)\|\s{3}(ON\s|OFF)\|(\s+|\s+\w+)\|\s{5}(ON\s|OFF)\n|\s{3}(\d)\s\|\s+(\w+)\s+\|\s+(ON\s|OFF)\|(\s{2}\n|.\w+)|AC current draw\s(\d)\:\s(\d\.\d{2})|Max detected\s(\d\.\d{2})"
Local $sString = "pshow" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Port | Name |Status| Reservation" & @CRLF & _
"" & @CRLF & _
" 1 | Fan | ON | " & @CRLF & _
"" & @CRLF & _
" 2 | Clim | OFF| mofa" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
">" & @CRLF & _
"" & @CRLF & _
"����������"" & @CRLF & _
"Synaccess Inc. Telnet Session V6.2." & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"pshow" & @CRLF & _
"" & @CRLF & _
">" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Port| Name |status| Reservation |RB Timer" & @CRLF & _
"" & @CRLF & _
"----+----------------+------+----------------+--------" & @CRLF & _
"" & @CRLF & _
" 1| Outlet1| OFF| | ON " & @CRLF & _
"" & @CRLF & _
" 2| Outlet2| ON | mofa| OFF" & @CRLF & _
"" & @CRLF & _
" 3| Outlet3| ON | | OFF" & @CRLF & _
"" & @CRLF & _
" 4| Outlet4| OFF| | OFF" & @CRLF & _
"" & @CRLF & _
" 5| Outlet5| ON | | OFF" & @CRLF & _
"" & @CRLF & _
" 6| Outlet6| ON | | OFF" & @CRLF & _
"" & @CRLF & _
" 7| Outlet7| OFF| | OFF" & @CRLF & _
"" & @CRLF & _
" 8| Outlet8| ON | | OFF" & @CRLF & _
"" & @CRLF & _
" 9| Outlet9| ON | | OFF" & @CRLF & _
"" & @CRLF & _
" 10| Outlet10| OFF| | OFF" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"AC current draw 1: 0.05. Max detected 0.78 Amps." & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Temperature Probe is not installed" & @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