#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "([A-Z,0-9, ]*\d )?(?:(\d\d)(\d\d)/)?([a-z,A-Z,0-9, ,\-,',_,\.,\/ ,\*]*?)( [\-\+]?\d+,\d\d)?"
Local $sString = "CARTE X1796 1209/FREE MOBILE 75 PARIS" & @CRLF & _
"CARTE 51002 ITUNES.COM/BILL LUXEMBURG" & @CRLF & _
"CARTE X1796 0209/SNCF INTERNET 75 PARIS CEDEX 09" & @CRLF & _
"CARTE X1796 1408/THE COLUMBIA STO 124 -156,76" & @CRLF & _
"CARTE X1796 1208/NICKLAUS NORTH G 124 -168,41" & @CRLF & _
"CARTE 51002 PAYPAL*DIGITALRIVE DRI* 35314369001" & @CRLF & _
"CARTE 51002 APPLE ONLINE EURO HOLLYHILL" & @CRLF & _
"PAYPAL*PAYPAL*PHIBUELEC 4029357733" & @CRLF & _
"PAYPAL*OSCARO COM 35314369001" & @CRLF & _
""
Local $sSubst = "Nom rationnalisé: $4\rMoyen de paiement: $1\rDate opération :$2/$3\r\r"
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