#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)(?:demande|incident).*(?'num_externe'INC[0-9]*).*(?:\n.*)*Nom\s*:\s*(?'ins_libl'.*\)).*(?:\n.*)*Ville\s*:\s*(?'apt_localisation'.*?)\s*(?:\n.*)*-\s*Demandeur\s*:\s*(?'apt_nom'.*?,.*?),(?'apt_telephone'.*?),.*(?:\n.*)*Cat.gorie\s*:\s*(?'tsy_lib'.*?)\s*(?:\n.*)*\s*-.*Description.*?:\s*(?:\n.*)*\s*o\s*(?'commentaire_externe'.*?)\s*\n"
Local $sString = "<![CDATA[ Bonjour, " & @CRLF & _
" " & @CRLF & _
" La facture proforma de la demande n°INC0937639 a été mise à jour Pour accéder à ce dossier de nature " demande ", cliquer ici . " & @CRLF & _
" Détail des informations : " & @CRLF & _
" - Date de création : 21/03/2019 15:51:54 " & @CRLF & _
" - Site concerné : " & @CRLF & _
" o Nom : RRAA COURS LA VILLE (00363800) " & @CRLF & _
" o Etage : " & @CRLF & _
" o Bureau : " & @CRLF & _
" o Adresse 1 : 55 RUE GEORGES CLEMENCEAU " & @CRLF & _
" o Adresse 2 : " & @CRLF & _
" o Ville : COURS LA VILLE " & @CRLF & _
" o CP : 69470 " & @CRLF & _
" o Téléphone : 0474647881 " & @CRLF & _
" o Fax : 0474647888 " & @CRLF & _
" - Horaires du site : " & @CRLF & _
" o Statut : Ouvert LP : BERNARD,franck Lu=Fermé Fermé Ma=08H30-12H00 13H30-17H45 Me=08H30-12H00 13H30-17H45 Je=08H30-12H00 14H15-17H45 Ve=08H30-12H00 13H30-17H45 Sa=08H30-12H00 Fermé Di=Fermé Fermé " & @CRLF & _
" - Demandeur : FILLON,LOREN,0474647881, " & @CRLF & _
" - Logisticien : " & @CRLF & _
" o Monsieur BERNARD, franck " & @CRLF & _
" - Equipe d'affectation :LP " & @CRLF & _
" - Intervenant : BERNARD franck " & @CRLF & _
" - Catégorie : MULTITECHNIQUE\Petits travaux\Menuiserie " & @CRLF & _
" - Description du dossier : " & @CRLF & _
" o Pose d'une plaque pour boucher l'ouverture sur la boite aux lettres bureau RA " & @CRLF & _
" " & @CRLF & _
" Pour accéder à ce dossier, cliquer ici . " & @CRLF & _
" ]]>" & @CRLF & _
""
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