matching complete string with a list
From: paul (paul_at_not.net)
Date: 11/29/04
- Next message: Jan K.: "Re: insert PHP-clock-code / not working"
- Previous message: coolsti: "Re: How to get intermediate script results to browser?"
- Next in thread: paul: "Re: matching complete string with a list"
- Reply: paul: "Re: matching complete string with a list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Nov 2004 09:26:14 -0800
Dumb question if I knew anything about regular expressions but...
The following works but also catches partial matches such as 'bin-test'
if (!(ereg('not_public|bin', $value))){
The following does not error but does not work
if ($value != 'not_public' or $value != 'bin'){
This works, obviously
if ($value != 'not_public'){
Surely I don't need a bunch of nested if != statements? I'm sure there
is an easy answer to exact matching a $value to a list but I can't
figure it out.
Thanks.
- Next message: Jan K.: "Re: insert PHP-clock-code / not working"
- Previous message: coolsti: "Re: How to get intermediate script results to browser?"
- Next in thread: paul: "Re: matching complete string with a list"
- Reply: paul: "Re: matching complete string with a list"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]