Help setting up a Regex string for CI routing |
[eluser]stormbytes[/eluser]
Okay, so I'm not a Regex guru I'd like a routing string that does the following: Code: routes['media/string' = 'media/index/$1'; I'd specifically like to route all requests to 'media/whatever without a slash at the end, to media/index - thanks all your Regex Yodas out there
[eluser]toopay[/eluser]
[quote author="stormbytes" date="1303664005"]to any letter/number/hyphen/underscore [/quote] Code: routes['media/([a-zA-Z0-9_\-]+)'] = 'media/index/$1';
[eluser]InsiteFX[/eluser]
@strombytes Here is a link to an Online Regex Program, If you look at the very bottom right hand side you can download a desktop version of it for your computer! Online Regex Program InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |