Update Statement to replace text with regex

I want to run an update query on a document, where I want to find a specific text and replace it with another.
for ex:
{
“id”:“123”,
“text”:“quick brown fox”
}

I want to replace brown with black, is there any n1ql query to do this change, now the find word can be anywhere in the document under any key.

Thanks
@vsr1

UPDATE mybucke AS b
SET b = decode_json(REPLACE(encode_json(b),"brown","black"));

It changes in document fields too.