Tag Archives: case insensitive

preg_match case insensitive

Share preg_match case insensitive <?php // The ”i” after the pattern delimiter indicates a case-insensitive search if (preg_match(“/php/i”, ”PHP is the web scripting language of choice.”)) {     echo ”A match was found.”; } else {     echo ”A match was not found.”; } ?>

Posted in php, regex | Tagged , , , | Leave a comment