title: javascript - replace dash (hyphen) with a space
body: <p>I have been looking for this for a while, and while I have found many responses for changing a space into a dash (hyphen), I haven't found any that go the other direction.</p>
  
  <p>Initially I have:</p>
  
  <pre><code>var str = "This-is-a-news-item-";
  </code></pre>
  
  <p>I try to replace it with:</p>
  
  <pre><code>str.replace("-", ' ');
  </code></pre>
  
  <p>And simply display the result:</p>
  
  <pre><code>alert(str);
  </code></pre>
  
  <p>Right now, it doesn't do anything, so I'm not sure where to turn.  I tried reversing some of the existing ones that replace the space with the dash, and that doesn't work either.</p>
  
  <p>Thanks for the help.</p>