title: Why won't this route match
body: <p>I'm having some trouble getting routes to match.  </p>
  
  <p>I am using base-32 encoded int's as short links to slideshows in a web app.  There are 5 different versions of each slideshow, and I am using an initial letter to distinguish between each version.  </p>
  
  <p>The routes always match, except when the first character of the base-32 encoded int is the same as the character designating the slideshow version.  This anomaly exists for all 5 prefix letters: n, f, c, x, and h.</p>
  
  <p>What about the first two characters being the same makes these routes not match?  I'm at a loss to understand what's going on here (when the routes don't match, they simply fall through to the default).</p>
  
  <p>Route Matches (<code>/na0</code>):
  <img src="https://i.stack.imgur.com/kyLlj.png" alt="route for na0"></p>
  
  <p>Route Doesn't Match (<code>/nn0</code>):
  <img src="https://i.stack.imgur.com/snTEm.png" alt="route for nn0"></p>
  
  <p>Route Matches (<code>/nfg</code>):
  <img src="https://i.stack.imgur.com/MAdIC.png" alt="route for nfg"></p>
  
  <p>Route Doesn't Match (<code>/ffg</code>):
  <img src="https://i.stack.imgur.com/mD7cF.png" alt="route for ffg"></p>
  
  <p>I'm boggled.  Here's the routing code, in case it isn't clear in the RouteDebug tables in the screenshots:</p>
  
  <pre><code>        routes.MapRoute(
              "NonBrandedSlideshow",
              "n{id}",
              MVC.Slideshow.NonBranded(), null,
              new { id = Settings.Base32Regex }
          );
  
          routes.MapRoute(
              "FullSlideshow",
              "f{id}",
              MVC.Slideshow.Full(), null,
              new { id = Settings.Base32Regex }
          );
  
          routes.MapRoute(
              "CompactSlideshow",
              "c{id}",
              MVC.Slideshow.Compact(), null,
              new { id = Settings.Base32Regex }
          );
  
          routes.MapRoute(
              "FlexibleSlideshow",
              "x{id}",
              MVC.Slideshow.Flexible(), null,
              new { id = Settings.Base32Regex }
          );
  
          routes.MapRoute(
              "Html5Slideshow",
              "h{id}",
              MVC.Slideshow.NonBrandedHtml5(), null,
              new { id = Settings.Base32Regex }
          );
  </code></pre>
  
  <p>I should note here that I am using <a href="http://mvccontrib.codeplex.com/wikipage?title=T4MVC_doc&amp;referringTitle=T4MVC" rel="nofollow noreferrer">T4MVC</a> (see section 2.2.5), and these <code>MapRoute</code> methods are extensions added by T4MVC.  The <code>MapRoute</code> methods I am using are equivalent to the standard methods, and I have tried using the non-T4MVC <code>MapRoute</code> method with the same result:</p>
  
  <pre><code>        routes.MapRoute(
              "Html5Slideshow",
              "h{id}",
              new { controller = "Slideshow", action = "NonBrandedHtml5" },
              new { id = Settings.Base32Regex }
          );
  </code></pre>
  
  <p>Here is the Base32Regex, though I have tried it with and without this constraint (the Base32 implementation I am using will assume I and O are 1 and 0, for example).</p>
  
  <pre><code>public static partial class Settings
  {
      public static string Base32Regex
      {
          get { return @"[0-9ABCDEFGHJKMNPQRSTVWXYZ]+"; }
      }
  }
  </code></pre>