#include <MsgBoxConstants.au3> ; to declare the Constants of MsgBox
Local $sRegex = "(?m)r: "none"(?=[^{}]+i: "garson2")"
Local $sString = ""589": {" & @CRLF & _
" p: "no-repeat"," & @CRLF & _
" c: 97," & @CRLF & _
" q: "100% 100%"," & @CRLF & _
" bS: 420," & @CRLF & _
" cP: "garson"," & @CRLF & _
" r: "none"," & @CRLF & _
" d: 138," & @CRLF & _
" cQ: 1," & @CRLF & _
" gg: "0"," & @CRLF & _
" cR: 1," & @CRLF & _
" aP: "pointer"," & @CRLF & _
" h: "553"," & @CRLF & _
" i: "garson2"," & @CRLF & _
" bF: "578"," & @CRLF & _
" aI: 35," & @CRLF & _
" j: "absolute"," & @CRLF & _
" x: "visible"," & @CRLF & _
" aA: {" & @CRLF & _
" a: [{" & @CRLF & _
" d: 1.1," & @CRLF & _
" p: 1," & @CRLF & _
" g: 1," & @CRLF & _
" f: 1" & @CRLF & _
" }, {" & @CRLF & _
" p: 4," & @CRLF & _
" h: "474"" & @CRLF & _
" }, {" & @CRLF & _
" p: 4," & @CRLF & _
" h: "476"" & @CRLF & _
" }]" & @CRLF & _
" }," & @CRLF & _
" k: "div"," & @CRLF & _
" aJ: 35," & @CRLF & _
" dB: "img"," & @CRLF & _
" z: 23," & @CRLF & _
" Q: 16," & @CRLF & _
" aK: 35," & @CRLF & _
" R: "rgba(0, 0, 0, 0.411)"," & @CRLF & _
" S: 5," & @CRLF & _
" a: 140," & @CRLF & _
" aL: 35," & @CRLF & _
" T: 4," & @CRLF & _
" b: 2" & @CRLF & _
" }"
Local $sSubst = "r: "inline""
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