I have a string that outputs like this:
"firstName" "lastName"
I need to the output to be like
"firtName lastName"
or else I get bad string request. I have tried different regex combinations that could achieve that however so far I can remove the quotes at the beginning and end of the string and the ones in the middle.
var string = '"firstName" ,"lastName"';
var stringWithoutCommas = string.replace(/,/g, '');
var stringWithoutExtQuotes = stringWithoutCommas.replace(/^"(.+(?="$))"$/, '$1');
console.log(stringWithoutExtQuotes); //firstName" "lastName
thanks you.