#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?mx)(?(DEFINE)" & @CRLF & _
" (?<ips>[^()]+)" & @CRLF & _
" (?<incoming>Incoming\ Interface \ List)" & @CRLF & _
" (?<outgoing>Outgoing\ Interface \ List)" & @CRLF & _
" (?<end>^$|\Z)" & @CRLF & _
")" & @CRLF & _
"^\((?P<ip>(?&ips))\)" & @CRLF & _
"(?:(?!(?&incoming))[\s\S]+?)" & @CRLF & _
"(?&incoming)[\r\n]" & @CRLF & _
"(?P<in>(?!(?&outgoing))[\s\S]+?)" & @CRLF & _
"(?&outgoing)[\r\n]" & @CRLF & _
"(?P<out>(?!^$)[\s\S]+?)" & @CRLF & _
"(?&end)"
Local $sString = "(192.168.1.1,232.0.6.8) RPF nbr: 55.44.23.1 Flags: RPF" & @CRLF & _
" Up: 4w1d" & @CRLF & _
" Incoming Interface List" & @CRLF & _
" TenGigE0/0/0/1 Flags: A, Up: 4w1d" & @CRLF & _
" Outgoing Interface List" & @CRLF & _
" TenGigE0/0/0/10 Flags: A, Up: 4w1d" & @CRLF & _
"" & @CRLF & _
"(192.168.55.3,232.0.10.69) RPF nbr: 66.76.44.130 Flags: RPF" & @CRLF & _
" Up: 4w1d" & @CRLF & _
" Incoming Interface List" & @CRLF & _
" TenGigE0/0/0/0 Flags: A, Up: 4w1d" & @CRLF & _
" TenGigE0/1/0/0 Flags: A, Up: 4w1d" & @CRLF & _
" TenGigE0/2/0/0 Flags: A, Up: 4w1d" & @CRLF & _
" Outgoing Interface List" & @CRLF & _
" TenGigE0/0/0/10 Flags: A, Up: 4w1d" & @CRLF & _
" TenGigE0/3/0/0 Flags: A, Up: 4w1d" & @CRLF & _
" TenGigE0/4/0/0 Flags: A, Up: 4w1d"
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