#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)<(.+)>([^<>]*)</\1>"
Local $sString = " <Interceptor>" & @CRLF & _
" <AttackCoords>-80.03107887624853,25.351308629611</AttackCoords>" & @CRLF & _
" <Outcome>Interdiction</Outcome>" & @CRLF & _
" <Infiltrators>6</Infiltrators>" & @CRLF & _
" <Enforcer>Assured</Enforcer>" & @CRLF & _
" <ActionDate>2013-11-03</ActionDate>" & @CRLF & _
" <ActionTime>04:40:00</ActionTime>" & @CRLF & _
" <RecordNotes>Infiltrators: " & @CRLF & _
" Savanna Carrera," & @CRLF & _
" Gregoria Farías," & @CRLF & _
" Julina Abeyta," & @CRLF & _
" Mariquita Alonso," & @CRLF & _
" Urbano Briseño," & @CRLF & _
" Victoro Montano </RecordNotes>" & @CRLF & _
" <NumEscaped>3</NumEscaped>" & @CRLF & _
" <LaunchCoords></LaunchCoords>" & @CRLF & _
" <AttackVessel>Raft</AttackVessel>" & @CRLF & _
" </Interceptor>"
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