My string is like this:
temp="'SE019','SR132','SC123'";
I use a function like:
temp.replace("'","");
But the result will be:
SE019','SR132','SC123'
only the first quote is removed I need all the quotes to be removed
Use a regex literal with the g (for global, meaning match all occurrences) option.
temp.replace(/'/g,"");
See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With