#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?s)^.*?Name.+?backup01\nKind.+?\nID?\s+:\s([A-Z0-9\-]+)"
Local $sString = "====================================================" & @CRLF & _
"Name : backup02" & @CRLF & _
"Kind : Local" & @CRLF & _
"Mount Point : /Volumes/ext_backup01_02" & @CRLF & _
"ID : BC51C9FA-DE8A-4BA3-B23E-AEC10E9E9F69" & @CRLF & _
"> ==================================================" & @CRLF & _
"Name : backup01" & @CRLF & _
"Kind : Network" & @CRLF & _
"URL : afp://username@server02.local/backup01" & @CRLF & _
"Mount Point : /Volumes/backup01" & @CRLF & _
"ID : 009B3736-61C5-4996-B9BC-A5230BED7961" & @CRLF & _
"====================================================" & @CRLF & _
"Name : backup03" & @CRLF & _
"Kind : Network" & @CRLF & _
"URL : afp://username@server67.local/backup03" & @CRLF & _
"Mount Point : /Volumes/backup01" & @CRLF & _
"ID : 1E9A3734-33D6-1316-C9B4-B143DA35D9F2" & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; 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