The regular expression doesn't work
<p>Trying to replace any non alpha-numeric characters with a hyphen. Can't see why it shouldn't be working. It returns the original string unchanged.</p>

<pre><code>item.mimetype = "image/png";

var mimetype = item.mimetype.toLowerCase().replace("/[^a-z0-9]/g",'-');
</code></pre>
