#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?im)"([a-zA-Z]?[a-zA-Z0-9].*)" ?: ?((true|false|null)|([\d].*)),"
Local $sString = "{" & @CRLF & _
" "LegalFeeNet": 363.54," & @CRLF & _
" "LegalFeeVat": 72.708," & @CRLF & _
" "DiscountNet": 0.0," & @CRLF & _
" "DiscountVat": 0.0," & @CRLF & _
" "OtherNet": 12.0," & @CRLF & _
" "OtherVat": 2.4," & @CRLF & _
" "DisbursementNet": 220.0," & @CRLF & _
" "DisbursementVat": 0.0," & @CRLF & _
" "AmlCheck": null," & @CRLF & _
" "LegalSubTotal": 363.54," & @CRLF & _
" "TotalFee": 450.648," & @CRLF & _
" "Discounts": 0.0," & @CRLF & _
" "Vat": 75.108," & @CRLF & _
" "DiscountedPrice": 360.5184," & @CRLF & _
" "RecommendedRetailPrice": 450.648," & @CRLF & _
" "SubTotal": 375.54" & @CRLF & _
"}"
Local $sSubst = "$1 = $3$4M,"
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