Pattern Matching
am 14.07.2009 22:24:27 von VamVan--0016e644d6c8a7536a046eb03938
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hello Guys,
I have a question related to pattern matching and wildcards. This is the
scenario.
I have friendly urls on my website. So retrive their path as arguments for
every page.
so for example if I have www.xx.com/contact/me my args array will be
args(
0 => contact,
1 => me
)
My requirement is to change the page title on the fly with specific
patterns, so what I do is define a look up table with these columns.
path, pageTitle
contact/me - Contact US
perfect match would be easy because I can exactly look for what I want.
It becomes tricky when I introduce wild cards like contact/* for example. It
could also be contact/me/*
How would I match patterns for this kind of relative matches.? Any ideas
anyone?
Thanks,
V
--0016e644d6c8a7536a046eb03938--