📜  php regex string start - PHP 代码示例

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

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