Use the ! operator...
if (eregi("z", $string)) {
echo "'$string' contains a 'z' or 'Z'!";
}
(If the string contains a Z)
if (!eregi("z", $string)) {
echo "'$string' contains anything other than a 'z' or 'Z'!";
}
(If the string doesn't contain a z, implies it contains anything other than a z)
When you do this, you kind of have to think backwards in your conditional actions too, but it's one way to do it.