try this if (preg_match("@siteUserList.cgi?group=site177&?@", $QUERY_STRING))
(I added a "?" after get "&") -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 01, 2002 11:29 AM To: [EMAIL PROTECTED] Subject: [PHP] How to put these 2 IF statements into 1, with regex? Hi People, I was wondering if there is anyway to combine these two IF statements into one: if (preg_match("@siteUserList.cgi?group=site177@", $QUERY_STRING)) and: if (preg_match("@siteUserList.cgi?group=site177&@", $QUERY_STRING)) In other words I need it to match if the query string HAS or DOESNT HAVE a "&" at the end. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php