if (preg_match("/web/i", "PHP is the web scripting language of choice.")) { echo "A match was found."; } else { echo "A match was not found."; }