fork download
  1. <?php
  2.  
  3. $re = '/t(?!h(?:e|is))/i';
  4.  
  5. if (preg_match($re,'The cat and the dog are hungry'))
  6. echo 'true';
  7. else
  8. echo 'false';
  9. echo "\n";
  10. if (preg_match($re,'The lion and dog are hungry'))
  11. echo 'true';
  12. else
  13. echo 'false';
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
true
false