title: mod rewrite friendly url
body: <p>I'm new to regular expressions and need to rewrite an example URL:</p>
  
  <pre><code>http://domain.com/quiz.php?id=1
  </code></pre>
  
  <p>To the friendly URL,which looks like forum URL, like this:</p>
  
  <pre><code>http://domain.com/1-quiz-title
  </code></pre>
  
  <p>So <code>1</code> is the GET variable. Title must be lowercase only</p>
  
  <p>I tried the following but it seems incorrect:</p>
  
  <pre><code>RewriteRule ^([a-z0-9\-]+)$ quiz.php?id=$1 [L]
  </code></pre>
  
  <p>It's picking the GET variable as <code>1-quiz-title</code> while it should be only <code>1</code></p>
  
  <p>Thanks</p>