#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?<=participant id=").*?(?=\")"
Local $sString = "<?xml version="1.0" encoding="UTF-8"?>" & @CRLF & _
"" & @CRLF & _
"<recording xmlns="urn:ietf:params:xml:ns:recording" xmlns:ac=http://aaa>" & @CRLF & _
"" & @CRLF & _
"<datamode>complete</datamode>" & @CRLF & _
"" & @CRLF & _
"<group id="00000000-0000-0084-2bb2-880019360e65">" & @CRLF & _
"" & @CRLF & _
"<associate-time>2024-01-30T13:10:49</associate-time>" & @CRLF & _
"" & @CRLF & _
"</group>" & @CRLF & _
"" & @CRLF & _
"<session id="0000-0000-0000-0000-bc3f13048a90ea74">" & @CRLF & _
"" & @CRLF & _
"<group-ref>00000000-0000-0084-2bb2-880019360e65</group-ref>" & @CRLF & _
"" & @CRLF & _
"<associate-time>2024-01-30T13:10:49</associate-time>" & @CRLF & _
"" & @CRLF & _
"</session>" & @CRLF & _
"" & @CRLF & _
"<participant id="+11111111111" session="0000-0000-0000-0000-bc3f13048a90ea74">" & @CRLF & _
"" & @CRLF & _
"<nameID aor=+11111111111@x.x.x.x></nameID>" & @CRLF & _
"" & @CRLF & _
"<associate-time>2024-01-30T13:10:49</associate-time>" & @CRLF & _
"" & @CRLF & _
"<send>00000000-2f30-0084-2bb2-880019360e65</send>" & @CRLF & _
"" & @CRLF & _
"<recv>00000001-42a6-0084-2bb2-880019360e65</recv>" & @CRLF & _
"" & @CRLF & _
"</participant>" & @CRLF & _
"" & @CRLF & _
"<participant id="+22222222222" session="0000-0000-0000-0000-bc3f13048a90ea74">" & @CRLF & _
"" & @CRLF & _
"<nameID aor=+22222222222@y.y.y.y></nameID>" & @CRLF & _
"" & @CRLF & _
"<associate-time>2024-01-30T13:10:49</associate-time>" & @CRLF & _
"" & @CRLF & _
"<send>00000001-42a6-0084-2bb2-880019360e65</send>" & @CRLF & _
"" & @CRLF & _
"<recv>00000000-2f30-0084-2bb2-880019360e65</recv>" & @CRLF & _
"" & @CRLF & _
"</participant>" & @CRLF & _
"" & @CRLF & _
"<stream id="00000000-2f30-0084-2bb2-880019360e65" session="0000-0000-0000-0000-bc3f13048a90ea74">" & @CRLF & _
"" & @CRLF & _
"<label>1</label>" & @CRLF & _
"" & @CRLF & _
"</stream>" & @CRLF & _
"" & @CRLF & _
"<stream id="00000001-42a6-0084-2bb2-880019360e65" session="0000-0000-0000-0000-bc3f13048a90ea74">" & @CRLF & _
"" & @CRLF & _
"<label>2</label>" & @CRLF & _
"" & @CRLF & _
"</stream>" & @CRLF & _
"" & @CRLF & _
"</recording>"
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