JSON Response Body:-
{ "field1":value1, "field2":value2, "field3":value3, "field4":value4, "field5":value5 } I need to replace specific value of field3 in above JSON response to some other value e.g. valueX
Tried Burpsuite > Proxy > Options > Match and Replace
Enabled: True
Item: Response Body
Match: ^"field3":value3$
Replace: "field3":valueX"
Type: Regex
Expected JSON
{ "field1":value1, "field2":value2, "field3":valueX, "field4":value4, "field5":value5 } Thanks
11 Answer
Your regular expression doesn't exactly match the line field3 line. For example, you have a leading space on that line, so ^" will not match.
I recommend you simplify the expression a little:
Match: "field3":value3 Replace: "field3":valueX