title: Ruby Regex Rubular vs reality
body: <p>I have a string and I want to remove all non-word characters and whitespace from it. So I thought Regular expressions would be what I need for that.</p>
  
  <p>My Regex looks like that (I defined it in the string class as a method):</p>
  
  <pre><code>/[\w&amp;&amp;\S]+/.match(self.downcase)
  </code></pre>
  
  <p>when I run this expression in Rubular with the test string <code>"hello ..a.sdf asdf..,"</code> it highlioghts all the stuff I need ("hellloasdfasdf") but when I do the same in irb I only get "hello".</p>
  
  <p>Has anyone any ideas about why that is?</p>