RE: [PHP] How to put these 2 IF statements into 1, with regex?
| From: | Martin Towell | Date: | Mon, 01 Jul 2002 01:31:43 +0000 |
| Subject: | RE: [PHP] How to put these 2 IF statements into 1, with regex? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-104610@lists.php.net to get a copy of this message | ||
try this
if (preg_match("@siteUserList.cgi?group=site177&?@", $QUERY_STRING))
(I added a "?" after get "&")
-----Original Message-----
From: php@net.co.cr [mailto:php@net.co.cr]
Sent: Monday, July 01, 2002 11:29 AM
To: php-general@lists.php.net
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