user5711693
user5711693

Reputation: 113

Replacing double quotes with space, Google Apps Script

I am trying to replace/remove all instances of double quotes specified in a string in Google Apps Script but am unsuccessful in doing this.

I have tried the following:

str.replace(/["']/g,"");

but this does not work in Google Apps Script, works in JavaScript.

Can you please advise if this is possible? Thanks in advance!

Upvotes: 0

Views: 3072

Answers (1)

Amit Agarwal
Amit Agarwal

Reputation: 11278

This should work.

str = str.replace(/\"+/g,"");

Upvotes: 2

Related Questions