I decided to post this. I always forget syntax for replacing double quotes in javascript.
There are tons of posts for replacing doubles quotes but still tough to find when i need urgently.
//code sample
// this is string with lots of double quotes
var err = "blahahahah a string with lots of double quotes ";
alert (err); // this will alert string with double quotes.
err = err.replace(/\"/g, "");
alert (err); // this will alert string without double quotes.
This is a simple regex for replacing all double quotes in javascript. "/g" is for replacing all double quotes in a string.
There are tons of posts for replacing doubles quotes but still tough to find when i need urgently.
//code sample
// this is string with lots of double quotes
var err = "blahahahah a string with lots of double quotes ";
alert (err); // this will alert string with double quotes.
err = err.replace(/\"/g, "");
alert (err); // this will alert string without double quotes.
This is a simple regex for replacing all double quotes in javascript. "/g" is for replacing all double quotes in a string.
thanks, its working for me
ReplyDelete....I forget that one, too. Thanks!
ReplyDeleteIt workerd amazingly well
ReplyDeleteIt worked really well...Thanks a ton
ReplyDeleteIt's not working for me guide me please
ReplyDeleteit working really file to remove quotes in integration
ReplyDelete