Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB