Portal Home > Knowledgebase > Articles Database > Regular Expression Help
Posted by smkied, 11-21-2008, 02:22 PM Regular Expression Help Howdy!! I'm trying to figure out how to write this using regular expression... it's for Google Analytics Goal Tracking... The URLS are as follows: /some_directory_name/another_directory_name/cart.php?=aksjdkjd /different_name_here/something_else/cart.php?=ieuriwo /blah_blah_blah/this_is_different/cart.php?=ewioru So as you can see, cart.php is the common thing here. It's actually the exact same file, regardless of the preceding directories and attached variables, which is why I need to use regular expression to identify the file for tracking. What I am looking for is a way to say:"ANY string of characters"cart.php"ANY string of characters" I hope that makes sense. Any one a total regular expression pro?? :-D
Posted by awatson, 11-21-2008, 02:37 PM I think this pattern will work: Code: /(.*)cart.php(.*)/ Of course how you use it depends on where it's being used __________________www.NEXCESS.NET - Shared/Reseller Hostingwww.eliteRAX.com - Dedicated Servers, Server Clusters
Add to Favourites Print this Article