quick [php function] -> [javascript function] question
<p>if anyone fancies doing me a really quick favour, it would be really appreciated:</p>

<pre><code>static function make_url_safe($z){
    $z = strtolower($z);
    $z = preg_replace('/[^a-zA-Z0-9\s] /i', '', $z);
    $z = str_ireplace(' ', '-', $z);
    return $z;
}
</code></pre>

<p>what js functions should i be looking at to convert this function to javascript?</p>
