I have this string:
var someString = "23/03/2012";
someString.replace(///g, "-");
You need to escape your slash.
/\//g