#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "^(Depense|Recette)_Aller_\d*_*(FEDER|RR974|POCT)_\d{2}_\d{4}_\d{1,2}_\d+C\w*.xml$"
Local $sString = "Depense_Aller_4689.xml : flux PJ seul, bordereau déjà envoyé, à ne pas signer" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_4659_661C.xml : flux complet, à signer DAF" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_FEDER_01_2017_1_19C.xml" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_FEDER_01_2017_1_19C_Auto.xml" & @CRLF & _
"Depense_Aller_7864_FEDER_01_2017_2_19C_Auto.xml" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_4344_SMPRR_01_2017_2_34C_Auto.xml" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_4344_RR974_01_2017_6_566C_Auto.xml" & @CRLF & _
"Depense_Aller_4038_RR974_01_2017_473C_Auto.xml" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_3469_RR974_01_2017_271C_Auto.xml : flux complet paye, à signer RH" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_4271_FEDER_01_2016_5A_Auto.xml : flux en annulation, à ne pas signer" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_2649_RR974_01_2017_5C_Auto.xml : flux indemnités élus Région, à signer par ?" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_3222_RR974_01_2017_216C_Auto.xml : flux indemnités élus CESER, à signer par ?" & @CRLF & _
"" & @CRLF & _
"Depense_Aller_3222_RR974_01_2017_219C_Auto.xml : flux indemnités élus CCEE, à signer par ?" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Appgfi\wwwGFTEST\astre\astromate\pes\recette :" & @CRLF & _
"" & @CRLF & _
"Recette_Aller_4271_RR974_01_2017_6C_Auto.xml : flux recette, à signer DAF" & @CRLF & _
"" & @CRLF & _
"Recette_Aller_4271_RR974_01_2016_21A_Auto.xml : flux recette en annulation, à ne pas signer" & @CRLF & _
""
Local $sSubst = ""
Local $sResult = StringRegExpReplace($sString, $sRegex, $sSubst)
MsgBox($MB_SYSTEMMODAL, "Result", $sResult)
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