I have this string:
var someString = \"23/03/2012\";
and want to replace all the \"/\" with \"-\".
I tried to do this:
<
First of all, that's a forward slash. And no, you can't have any in regexes unless you escape them. To escape them, put a backslash (\) in front of it.
\
someString.replace(/\//g, "-");
Live example