title: Regex replace non-word except dash
body: <p>I have a regex pattern <code>(\W|_)[^-]</code> doesn't work for <code>h_e.l_l.o - w_o.r_d</code> (replacement string is " ").</p>
  
  <p>It returns something like this:</p>
  
  <pre><code>h      w   
  </code></pre>
  
  <p>I hope to see at least something like this:</p>
  
  <pre><code>h e l l o - w o r d
  </code></pre>
  
  <p>How can I replace all non-word characters and <code>_</code> excluding the <code>-</code> symbol?</p>