title: URL Rewrite - optional parameter?
body: <p>I would like a regex string to reflect an optional parameter, in this case, a geographic state.</p>
  
  <p>I can accomplish this with two rules:</p>
  
  <pre><code>&lt;rewrite url="~/(.+)-(.+)/(.+).aspx" to="~/Default.aspx?city=$1&amp;amp;state=$2&amp;amp;term=$3&amp;amp;x=$4"/&gt;
  &lt;rewrite url="~/(.+)/(.+).aspx" to="~/Default.aspx?city=$1&amp;amp;state=NONE&amp;amp;term=$2&amp;amp;x=$4"/&gt;
  </code></pre>
  
  <p>With, a query to /Los+Angeles/cars.aspx:
  Geo - city: Los Angeles
  Geo - state: NONE</p>
  
  <p>With, a query to /Los+Angeles-CA/cars.aspx:
  Geo - city: Los Angeles
  Geo - state: CA</p>
  
  <p>I'm curious about if there is a way to do this in one rewrite statement.</p>
  
  <p>Thanks.</p>