[thelist] if this then this in php

sasha spam at bittersweet2.com
Mon Jan 6 13:16:03 CST 2003


On Mon, 6 Jan 2003 13:50:02 -0500, Adam <adam at hallinteractive.com> wrote:

> MSIE 5.[0-4]{1}[0-9]*
> Will this be 5.0 only and not 5.5?
>
> thanks again for any help.
>
> Adam Leon
> Pupilchoke Design
> http://www.pupilchoke.com
> http://www.tonguesnthumbs.net
>

Yes, because it is looking specifically for an agent string that starts
with 5.0, 5.1, 5.2, 5.3, 5.4, then any assortment of 0-9 that appears
afterwards.  If I wanted to include 5.5, I would make it MSIE 5.[0-9]*

Reg exp pattern syntax:
http://www.php.net/manual/en/pcre.pattern.syntax.php

--
sasha



More information about the thelist mailing list