title: Removing non-alphanumeric characters without removing international characters in ruby
body: <p>I want to remove non-alphanumeric character in a string, but not remove international characters, like accented letters. I also want to keep whitespace. Here is what I have so far:</p>
  
  <pre><code>the_string = the_string.gsub(/[^a-z0-9 -]/i, '')
  </code></pre>
  
  <p>This does remove international accented alpha characters though.</p>
  
  <p><strong>Solution that I used:</strong></p>
  
  <pre><code>the_string = the_string.gsub(/[^\p{Alnum}\p{Space}-]/u, '')
  </code></pre>
  
  <p>It works! Thanks.</p>