Slashes in routes

#1
[eluser]DPrevite[/eluser]
Is it possible to do slashes inside a regex match? I want to match
Code:
/controller/display/path/to/something

And then have that go into my display function with the string "path/to/something"

I tried this in my routes file, but didn't have any luck.
Code:
$route['controller/([A-Z0-9/])'] = 'controller/display/$1';

#2
[eluser]Crafter[/eluser]
To do slashes inside regex, prepend the slash like this
Code:
\/controller\/display\/path\/to\/something


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.