fork(4) download
  1. <?php
  2.  
  3. $find = "website scripting @";
  4. $string = "PHP is the website scripting @ language of choice.";
  5.  
  6. if (preg_match("/(?<!\\w)" . preg_quote($find) . "(?!\\w)/i", $string)) {
  7. echo "A match was found.";
  8. } else {
  9. echo "A match was not found.";
  10. }
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
A match was found.