title: Javascript url rewriter
body: <p>I would like to make an url rewriter in javascript, my problem is that if i make something like:</p>
  
  <pre><code>var str='/test/service-34.htm',
      exp='/test/service-[0-9]*.htm';
  console.log(str.match(exp));
  </code></pre>
  
  <p>I would get '/test/service-34.htm' as response, so if i can't make a replace like:</p>
  
  <pre><code>/test/service-34.htm -&gt; test.php?service=$1
  </code></pre>