You might have to insert a comma in there. I know the tutorials have commas in them to seperate the ereg parameters and the string to search. It might work without them though, but here's how I would put it:
if(!ereg("yes|no|maybe", $i)){
$i = "maybe";
}