Am I trying to change the body of an HTTP response using Charles Proxy using the rewrite / regex tool? The answer is JSON.
So, part of the return body of the JSON response:
"unavailablePosts": ["AA", "BB"],
I want too:
"unavailablePosts": "XXX",
I am trying to set up Charles's correspondence as follows:

So the regex looks like this:
"unavailablePosts": \[(.*)\],
But ... (as I ask this question) this does not work, i.e. nothing changes in the body of the response.
source share