#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?:BSSID +: (?<bssid>[a-z0-9]{2}(?::[a-z0-9]{2}){5}))|(?:Signal +: (?<signal>\d+)%)"
Local $sString = "There is 1 interface on the system:" & @CRLF & _
"" & @CRLF & _
" Name : Wi-Fi" & @CRLF & _
" Description : Intel(R) Wi-Fi 6 AX201 160MHz" & @CRLF & _
" GUID : random_guid" & @CRLF & _
" Physical address : 36:fe:a6:54:12:b0" & @CRLF & _
" Interface type : Primary" & @CRLF & _
" State : connected" & @CRLF & _
" SSID : random_ssid" & @CRLF & _
" BSSID : 36:fe:a6:54:12:b0" & @CRLF & _
" Network type : Infrastructure" & @CRLF & _
" Radio type : 802.11ac" & @CRLF & _
" Authentication : WPA2-Personal" & @CRLF & _
" Cipher : CCMP" & @CRLF & _
" Connection mode : Auto Connect" & @CRLF & _
" Band : 5 GHz" & @CRLF & _
" Channel : 149" & @CRLF & _
" Receive rate (Mbps) : 866.7" & @CRLF & _
" Transmit rate (Mbps) : 780" & @CRLF & _
" Signal : 85%" & @CRLF & _
" Profile : random_profile"
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