title: How to determine if an arbitrary URL matches a defined route
body: <p>How can I tell if a string matches a particular named route?</p>
  
  <p>I have a route like this:</p>
  
  <pre><code>routes.MapRoute(
      "FindYourNewRental",
      "find-your-new-rental/{market}/{community}.html",
      new { controller = "FindYourNewRental", action = "Community" }
      );
  
  string url = "http://www.website.com/find-your-new-rental/northerncalifornia/sacramento.html"
  </code></pre>
  
  <p>How can I programmatically tell if the 'url' string matches that route? Something like this:</p>
  
  <pre><code>// matches url with the named route "FindYourNewRental"
  if (IsRouteMatch(url, "FindYourNewRental")) 
  {
      // do something
  }
  
  public bool IsRouteMatch(string url, string routeName)
  {
       // How do I code this function
  }
  </code></pre>