title: How do I strip non alphanumeric characters from a string and keep spaces?
body: <p>I want to create a regex that removes all non-alphanumber characters but keeps spaces. This is to clean search input before it hits the db. Here's what I have so far:</p>
  
  <pre><code>@search_query = @search_query.gsub(/[^0-9a-z]/i, '')
  </code></pre>
  
  <p>Problem here is it removes all the spaces. Solutions on how to retain spaces?</p>