Regex for appending special characters to an array

I am having tough time converting this scenario using regex “[“a”, “b”]” to [“a”, “b”] and [“a”, “b”] to “[“a”, “b”]”

I am able to achieve adding a double Quote before and after the brackets but couldn’t achieve the complete expectation scenario.
Any help and suggestion is much appreciated