regular expression tester php code example
Example: php regex test
* Lets suppose, we want to test a string variable that contain exactly "Abc" in it.
So we can do it using .......
<?php
$str = "I am Abc.";
$pattern = "/Abc/i";
if (preg_match($pattern, $str))
{
echo "True.";
}
else
{
echo "False.";
}
?>