Hi, i problem with regex to my url route.. I have URL
,,var?" may by one or X...
var11/var12/var13/b/var21/var22/var23/t/var31/var32/var33
but url can by only
var11/var12/var13/b/var21/var22/var23/
or
var11/var12/var13/
For example.. this is URL to eshop.. For viewing products in category's and in the url is brands filter and tag filter.. I can't change the char representing filter key..
I am function solution.. Writed route for every option format of url.. Can you help me find better solution please?
Problem with regex to my url route
Moderator: General Moderators
Re: Problem with regex to my url route
I... dont... understand....
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: Problem with regex to my url route
Try giving us examples of your input and examples of the output from that input. Give us enough, and maybe we can determine what you are trying to do and help you mutate the input into the output.
Re: Problem with regex to my url route
oh.. i'am sorry for my bad english..
Input url may be
http://www.domain.com/shoes/sport/b/nike/asolo/t/news
or
http://www.domain.com/t-shirt/t/mens
or
http://www.domain.com/skirts/
I'am try match category as ([^bt]*) but problem come when category name is boots or anything else beginning with the letter b or t..
Input url may be
http://www.domain.com/shoes/sport/b/nike/asolo/t/news
or
http://www.domain.com/t-shirt/t/mens
or
http://www.domain.com/skirts/
I'am try match category as ([^bt]*) but problem come when category name is boots or anything else beginning with the letter b or t..
Re: Problem with regex to my url route
Tell it to match a forward slash after that letter then.
For this I would really use an existing MVC framework, you wouldn't have to write regex for one.
For this I would really use an existing MVC framework, you wouldn't have to write regex for one.