title: codeigniter 3 URI routing - geting right hand side from given url
body: <p>I need to simulate routing in Codeigniter 3, so my question is how to get the right-hand side from any URL programmatically?</p>
  
  <p>for example, some routes that I have:</p>
  
  <pre><code>$route["blog"] = "Main/blog/en";
  $route["blog/(:any)"] = "Main/blog/en/$1";
  $route["novosti"] = "Main/blog/sr";
  $route["novosti/(:any)"] = "Main/blog/sr/$1";
  $route["contact"] = "Main/contact/en";
  $route["kontakt"] = "Main/contact/sr";
  </code></pre>
  
  <p>Now I need a function that can return right-hand side for a given URL part something like this:</p>
  
  <pre><code>echo $this-&gt;route-&gt;item("novosti/petar")
  </code></pre>
  
  <p>should print then Main/blog/sr/$1 or Main/blog/sr/petar</p>
  
  <p>Is there such a function in Codeigniter, because I can't find it in documentation?</p>
  
  <p><strong>UPDATE:</strong>
  I am looking throughout system/router class and I see that protected function _parse_routes is doing something similar so if there is no function that can give me what I need I will create one based on this one.</p>