title: How to remove all special Characters from a string except - . and space
body: <p>I have a string where I want to remove all special characters except hyphen , a dot and space.</p>
  
  <p>I am using <code>filename.replaceAll("[^a-zA-Z0-9.-]","")</code>. It is working for <code>.</code> and <code>-</code> but not for space.</p>
  
  <p>What should I add to this to make it work for space as well?</p>