how to replace string when Javascript string variable may contain forward slash?
<p>I'm trying to sort out how to replace a substring in a string when the substring to be found/replaced is a variable that may have one or more occurrences of a forward slash.  I suspect the issue is in escaping the incoming string properly....but I'm kind of lost on the syntax to insert the escapes correctly. </p>

<pre><code>var incomingStr = 'some text/take / out/ and yet more.';
var removethis = '/take / out/';
newStr = incomingStr.replace(removethis," ");
newStr should be:  'some text and yet more.'
</code></pre>
