SyntaxFix
Write A Post
Hire A Developer
Questions
var mystring = "this,is,a,test" mystring.replace(/,/g, "newchar");
Use the global(g) flag
g
Simple DEMO