更新问题:
$li_text = $li->plaintext;
echo '<br>'.$li_text;
echo '<br>'.$li_text = preg_replace('/\:(.*?)\>/',':', $li_text);
$li
获得价值“资格:学校和毕业> BE / B.Tech(工程)”//by using simple html DOM parsing from other websites
我得到的输出是
Qualification : School & Graduation > BE / B.Tech ( Engineering )
Qualification : School & Graduation > BE / B.Tech ( Engineering )
如果我分配$li_text = "Qualification : School & Graduation > BE / B.Tech ( Engineering )"
,那么 REGEX 工作正常。