RE: [PHP] Regex question
| From: | Boaz Yahav | Date: | Tue, 31 Jul 2001 12:39:27 +0000 |
| Subject: | RE: [PHP] Regex question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-60387@lists.php.net to get a copy of this message | ||
In case anyone is interested, eregi("HTTP/1.[01].302",$output) seems to
work :)
berber
-----Original Message-----
From: Boaz Yahav
Sent: Tuesday, July 31, 2001 2:03 PM
To: PHP General (E-mail)
Subject: [PHP] Regex question
I'm trying to find if a string exists inside a string. Instead of using
strstr() twice I want to use eregi() once.
What I want to check is if "HTTP/1.1 302" or "HTTP/1.0 302" exists in
some $output.
I'm trying something like :
eregi("[\"HTTP/1.\"]+[0-1]+[\" 302\"]",$output)
eregi("[HTTP/1.]+[0-1]+[ 302]",$output)
eregi("HTTP/1.+[0-1]+ 302",$output)
But I must be off cause it doesn't work.
Anyone?
thanks
berber
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net