Answers for "pregmatch"

PHP
1

find substring regx php

if (preg_match("/\bweb\b/i", "PHP is the web scripting language of choice.")) {
    echo "A match was found.";
} else {
    echo "A match was not found.";
}
Posted by: Guest on May-26-2020
2

php preg_match

preg_match ( string $pattern , string $subject [, array &$matches [, int $flags = 0 [, int $offset = 0 ]]] ) : int
Posted by: Guest on April-10-2020
0

pregmatch

<?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 by: Guest on June-14-2021

Browse Popular Code Answers by Language