php-general | 2001072
Date: 07/31/01
- Next message: Andrew Sterling Hanenkamp: "[PHP] Re: Sort by bigger count(*)"
- Previous message: Andreas D . Landmark: "Re: [PHP] Failure Configuring 4.0.6 on SuSE 7.1"
- In reply to: Boaz Yahav: "[PHP] Regex question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You're making your expressions too complicated. To test for just that
string,
eregi("HTTP/1\.[01] 302", $output)
should work.
Later,
Sterling
Boaz Yahav wrote:
> 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 <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andrew Sterling Hanenkamp: "[PHP] Re: Sort by bigger count(*)"
- Previous message: Andreas D . Landmark: "Re: [PHP] Failure Configuring 4.0.6 on SuSE 7.1"
- In reply to: Boaz Yahav: "[PHP] Regex question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

