title: Google App engine Url Mapping using WSGIAppl and regex grouping Help Needed
body: <p>take this example from google docs </p>
  
  <pre><code>class BrowseHandler(webapp.RequestHandler):
  
  &gt;     def get(self, category, product_id):
  &gt;         # Display product with given ID in the given category.
  &gt; 
  &gt; 
  &gt; # Map URLs like /browse/(category)/(product_id) to
  &gt; BrowseHandler. application =
  &gt; webapp.WSGIApplication([(r'/browse/(.*)/(.*)',
  &gt; BrowseHandler)
  &gt;                                      ],
  &gt;                                      debug=True)
  &gt; 
  &gt; def main():
  &gt;     run_wsgi_app(application)
  &gt; 
  &gt; if __name__ == '__main__':
  &gt;     main()
  </code></pre>
  
  <p>How can i change the regx groupings so that Product id is optional</p>
  
  <p>ie the url <a href="http://yourdomain.com/category" rel="nofollow noreferrer">http://yourdomain.com/category</a> will be sent to the browse handler in the current above example you must add a product id or at least the / after the category </p>
  
  <p>ie</p>
  
  <p><a href="http://yourdomain.com/category/" rel="nofollow noreferrer">http://yourdomain.com/category/</a></p>
  
  <p>r'/browse/(.<em>)/(.</em>)'</p>
  
  <p>Any ideas?</p>