$ perl -E'say "a nor b neither" =~ /^(?!.*neither).*nor.*$/mi ?1:0' 0