fork download
  1. <?php
  2.  
  3. $keywords = array("apple", "perl=true");
  4. $Text = "My apple is red. Try Perl=TRUE option.";
  5. foreach ($keywords as $Word)
  6. {
  7. if (preg_match("/\\b(" . preg_quote($Word) . ")s?\\b/i", $Text))
  8. {
  9. echo "$Word\n";
  10. }
  11. }
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
apple
perl=true