I wanted to change all the simple quotes ("…") of a string to smart quotes (“…”):
str.replace(/"/g,'“');
But then I realized that, in order to do it, I have to match the opening and closing quote, something like this:
str.replace(/REGEX_FOR_OPENING_QUOTES/g,'“');
str.replace(/REGEX_FOR_CLOSING)_QUOTES/g,'”');
What regex should I use in this case?