A
Archos
How to replace all strings at the same time?
"ab,c,d"
"ab,c,d"
How to replace all strings at the same time?
"ab,c,d"
If I understood correctly, you want to replace all the commas in a
variable with '', right? Then you might use a RegExp such as:
var a = "a,b,c,d";
a.replace(/,/g, '')
If I understood correctly, you want to replace all the commas in a
variable with '', right? Then you might use a RegExp such as:
var a = "a,b,c,d";
a.replace(/,/g, '')
Yes, thanks. I hope that the use of regular expressions been right for
main browsers.
If you don't feel comfortable with Regex, try:
var a = "a,b,c,d";
a = a.split(',').join('');
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.