title: Ruby regex and special characters like dash (—) and »
body: <p>I'm trying to replace all punctuation and the likes in some text with just a space. So I have the line</p>
  
  <pre><code>text = "—Bonne chance  Harry  murmura t il »"
  </code></pre>
  
  <p>How can I remove the dash and the dash and »? I tried</p>
  
  <pre><code>text.gsub( /»|—/, ' ')
  </code></pre>
  
  <p>which gives an error, not surprisingly. I'm new to ruby and just trying to get a hang of things by writing a script to pull all the words out of a chapter of a book. I figure I'd just remove the punctuation and symbols and just use text.split. Any help would be appreciated. I couldn't find much</p>