#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?ms)(RPA\s1:).+?Initiator\sID:\s(?<RPA1Initiator>[^ ]*)"
Local $sString = "SITE_VPLEX: " & @CRLF & _
" RPAs: " & @CRLF & _
" RPA 1: " & @CRLF & _
" Version: 4.1.SP1.P1(h.167)" & @CRLF & _
" WAN IP: 000.000.000.000" & @CRLF & _
" RPA LAN IPv4: 000.000.000.000" & @CRLF & _
" RPA LAN IPv6:N/A" & @CRLF & _
" iSCSI interface IPs: None" & @CRLF & _
" Interfaces: " & @CRLF & _
" Type: FC" & @CRLF & _
" Initiator ID: 50012481006bexxx" & @CRLF & _
" Type: FC" & @CRLF & _
" Initiator ID: 50012481006bexxx" & @CRLF & _
" Type: FC" & @CRLF & _
" Initiator ID: 50012481006bexxx" & @CRLF & _
" Type: FC" & @CRLF & _
" Initiator ID: 50012481006bexxx" & @CRLF & _
" Hardware details: " & @CRLF & _
" Hardware type: Intel Corporation S2600GZ GEN5" & @CRLF & _
" Adapter type: 2564" & @CRLF & _
" Vendor: Intel Corporation" & @CRLF & _
" Hardware Serial ID: FC6RP133000229_00000000002_FFF" & @CRLF & _
" Hardware Platform: Intel Corporation S2600GZ GEN5" & @CRLF & _
" Amount of memory: 16269416 KB" & @CRLF & _
" Number of CPUs: 12" & @CRLF & _
" RPA 2: " & @CRLF & _
" Version: 4.1.SP1.P1(h.167)" & @CRLF & _
" WAN IP: 000.000.000.000" & @CRLF & _
" RPA LAN IPv4: 000.000.000.000" & @CRLF & _
" RPA LAN IPv6:N/A" & @CRLF & _
" iSCSI interface IPs: None" & @CRLF & _
" Interfaces: " & @CRLF & _
" Type: FC" & @CRLF & _
" Initiator ID: 50012481006bdxxx" & @CRLF & _
" Type: FC" & @CRLF & _
" Initiator ID: 50012481006bdxxx" & @CRLF & _
" Type: FC" & @CRLF & _
" Initiator ID: 50012481006bdxxx" & @CRLF & _
" Type: FC" & @CRLF & _
" Initiator ID: 50012481006bdxxx" & @CRLF & _
" Hardware details: " & @CRLF & _
" Hardware type: Intel Corporation S2600GZ GEN5" & @CRLF & _
" Adapter type: 2564" & @CRLF & _
" Vendor: Intel Corporation" & @CRLF & _
" Hardware Serial ID: FC6RP133000135_0000000000_FFF" & @CRLF & _
" Hardware Platform: Intel Corporation S2600GZ GEN5" & @CRLF & _
" Amount of memory: 16269416 KB" & @CRLF & _
" Number of CPUs: 12"
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