Answers for "get data from string suing regx in php"

PHP
0

php regex strin start with

$string = "amora";
$result = preg_match("#^amor(.*)$#i", $string);
if($result == 0)
{
    echo "No match";
}
else
{
    echo "Match found.";
}
//out: Match found.
Posted by: Guest on September-10-2021
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

Browse Popular Code Answers by Language