#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)<NumDI>(?'num_externe'.*)<\x2FNumDI>.*<NomDemandeur>(?'apt_nom'.*)<\x2FNomDemandeur>.*<Installation>(?'ins_libl'.*)<\x2FInstallation>.*<Localisation>(?'apt_localisation'.*)<\x2FLocalisation>.*<Symptome>(?'tsy_lib'.*)<\x2FSymptome>.*<SousSymptome>(?'qsy_lib'.*)<\x2FSousSymptome>.*<DateSouhaitee>(?'dtheure_limite'.*)<\x2FDateSouhaitee>.*<Commentaires>(?'commentaire_externe'.*)<\x2FCommentaires>"
Local $sString = "<DEMANDE> <NumDI> 247902</NumDI> <NomDemandeur>BOURG</NomDemandeur> <Installation>84CA21558</Installation> <Localisation>ZAC,,,</Localisation> <Symptome>CHA2</Symptome> <SousSymptome>CHA2</SousSymptome> <Urgence>1</Urgence> <DateSouhaitee>15/05/2019</DateSouhaitee> <Commentaires>TEST DE CREATION DE DEMANDE</Commentaires> </DEMANDE> "
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