Javascript substring with escape characters
<p>i have a string like the following</p>

<pre><code>var string1 = " folder\\subfolder1\\subfolder2 "
</code></pre>

<p>and i want to replace the "\" with "/" with string1.replace in order to be</p>

<pre><code>var string2 = "folder/subfolder1/subfolder2"
</code></pre>

<p>I tried </p>

<pre><code>            var rep = path.replace("\\", "/");
</code></pre>

<p>but is not working. Any help ?</p>
