Testing a URL with regex

From: Date: Wed, 07 Jan 2009 12:24:37 +0000
Subject: Testing a URL with regex
Groups: php.general 
Request: Send a blank email to php-general+get-285545@lists.php.net to get a copy of this message
Let's say I have these URLs http://example.com/index.php?q=gallery http://example.com/index.php?q=gallery&g2_itemId=81 http://example.com/index.php?q=gallery&g2_itemId=100 I want to have a line of code that will extract just the "http://example.com/index.php?q=gallery" part of the URL. I am never good with regex, please help. TIA. -- roger -- Sign Up for free Email at http://ureg.home.net.my/

« previous php.general (#285545) next »