Re: Going Nuts with Ereg/Eregi - thanks
| From: | Patrick Teague | Date: | Sat, 06 Jul 2002 05:08:09 +0000 |
| Subject: | Re: Going Nuts with Ereg/Eregi - thanks | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105807@lists.php.net to get a copy of this message | ||
Woohoo! it works great now :)
Thanks much!
Patrick
----- Original Message -----
From: "Analysis & Solutions" <danielc@analysisandsolutions.com>
To: "PHP List" <php-general@lists.php.net>
Sent: Tuesday, July 02, 2002 9:19 AM
Subject: Re: [PHP] Going Nuts with Ereg/Eregi
> On Tue, Jul 02, 2002 at 05:26:45AM -0500, Patrick Teague wrote:
> >
> > $eregi_str = "(\; |\()Win[ \.a-z0-9]*(\)|\;)";
>
> $eregi_str = "(Windows|Win[^d])[^;]+";
>
> > if( eregi( $eregi_str, $browser_string, $arrstring ) )
> > {
> > $browser_os = $arrstring[0];
> > }
> >
> > This works fine except on some browsers which like to return Windows
> > multiple times such as this -
> >
> > "Mozilla/5.0 (Windows; U; Win98; en-US;........"
> >
> > Knowing that it's Windows doesn't help, I need to know it's Win98, etc.
>
> --Dan
>
> --
> PHP classes that make web design easier
> SQL Solution | Layout Solution | Form Solution
> sqlsolution.info | layoutsolution.info | formsolution.info
> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
> 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>