title: Convert Slash To Underscore Using URI Routing
body: <p>I'm creating routes in my applications and I was wondering if it can convert the slash in the url to underscore in my api.</p>
  
  <p>Here is an example of what I want to do:</p>
  
  <blockquote>
    <p><a href="http://www.example.dev/api/v1/test/supertest.json?id=7&amp;test=whatever" rel="nofollow">http://www.example.dev/api/v1/test/supertest.json?id=7&amp;test=whatever</a></p>
  </blockquote>
  
  <p>In my routes it has to be interpreted like:</p>
  
  <blockquote>
    <p><a href="http://www.example.dev/api/test_supertest/format/json?id=7&amp;test=whatever" rel="nofollow">http://www.example.dev/api/test_supertest/format/json?id=7&amp;test=whatever</a></p>
  </blockquote>
  
  <p>I succeed about the format and version but not about <code>test_supertest</code></p>
  
  <p>Here is my actual route :</p>
  
  <pre><code>$route['api/'.config_item('rest_api_version').'/(:any)'.'(/.*)'.'(\.:any)'.'(:any)'] = 'api/$1_$2$4&amp;format=$3';
  </code></pre>
  
  <p>How do I convert the slashes to underscores?</p>