why isn't my javascript .replace() working?
<p>I'm trying to remove any character except 0-9 a-z A-Z....</p>

<pre><code>var file_name = file.name;
file_name = file_name.replace(/[^A-Z0-9\._\-]/i, '');
</code></pre>

<p>any obvious reason the above isn't working?</p>
