title: Remove all non-word characters but "."
body: <p>What is the easiest way to remove all non-word characters of a filename? </p>
  
  <p>The dot at the end before the extension is obviously needed, so all symbols like "<code>-</code>" or "<code>*</code>" or "<code>?</code>" should be removed except "<code>.</code>"</p>
  
  <p>Something like this:</p>
  
  <pre><code>$filename = preg_replace("/[^\.]\W/", "", $filename);
  </code></pre>