title: ASP.NET MVC Custom route regex to catch a substring of items and check for their existence
body: <p>I'm trying to create a custom route for URL with the following format:</p>
  
  <blockquote>
    <p><a href="http://domain/nodes/" rel="nofollow">http://domain/nodes/</a>{item_1}/{item_2}/{item3_}/..../{item_[n]}</p>
  </blockquote>
  
  <p>Basically, there could be a random amount of item_[n], for example</p>
  
  <pre><code>http://domain/nodes/1/3/2 
  
  http://domain/nodes/1
  
  http://domain/nodes/1/25/11/45
  </code></pre>
  
  <p>With my custom route I would like to retrieve an array of items and do some logic (validate and add some specific information to request context) with them.</p>
  
  <p>For example from [http://domain/nodes/1/25/11/45] I would like to get an array of [1, 25, 11, 45] and process it.</p>
  
  <p>So, I have 2 problems here.</p>
  
  <p>The first one is a question actually. Am I looking in the right direction? Or there could be an easier way to accomplish this (maybe without custom routes)?</p>
  
  <p>The second problem is matching incoming url with a regex pattern. Could someone help me with it?</p>
  
  <p>Thanks in advance :)</p>