Js regular expressions remove quotation marks that are not empty, and retain quotation marks that are empty.

I need to remove quotation marks that are not empty, and keep quotation marks that are empty, such as:

`{image:"bitnami/wordpress:4.7.5-r2",wordpressFirstName:""}`

after processing:

`{image:bitnami/wordpress:4.7.5-r2,wordpressFirstName:""}`

Gods, give me a hint


const parser = /["']([^"']+)["']/g;
str.replace(parser, "$1")

var reg = / (['"]) (?! swords,) (< sup id=" fnref-1 "> 1 < / sup > +) 1var text
var text ='{image:" bitnami/wordpress:4.7.5-r2 ", wordpressFirstName:", b: "ccc", "bb": 1}'
text.replace (reg,'$2')

prevent matching ", b:"
< hr >
    < li id= "fn-1" >'" please
Menu