📜  php regex string start with - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:38.625000             🧑  作者: Mango

代码示例1
$string = "amora";
$result = preg_match("#^amor(.*)$#i", $string);
if($result == 0)
{
    echo "No match";
}
else
{
    echo "Match found.";
}
//out: Match found.