Pattern Matching

From: Date: Tue, 14 Jul 2009 20:24:27 +0000
Subject: Pattern Matching
Groups: php.general 
Request: Send a blank email to php-general+get-295385@lists.php.net to get a copy of this message
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

« previous php.general (#295385) next »