【php开源代码栏目提醒】:网学会员,鉴于大家对php开源代码十分关注,论文会员在此为大家搜集整理了“preg_match_6.php”一文,供大家参考学习!
<?php
$pattern="/^PHP$/";
$str="
PHP";
if (preg_match($pattern,$str))
print("发现匹配!<br>");
else
print("没发现匹配!<br>");
$str=" PHP is the best scripting language";
if (preg_match($pattern,$str))
print("发现匹配!<br>");
else
print("没发现匹配!<br>");
?>