标签: php preg-match
我必须找到这个字符序列"<div" 我使用这种模式:"/\<div/"但是preg_match的结果数组是null: 数组([0] =&gt;
"<div"
"/\<div/"
$domObject = "iajsdijasidijsad<div class=\"_3-ma _2bne\">`</div>sidjiasdjiasjdiasjid";` $pattern = '/\<div/'; preg_match($pattern, $domObject, $result); print_r($result);