不知道你要的是不是这样的效果?<?php
header("Content-Type:text/html;charset:UTF-8");
$content='<a href="495662.html"title="更新时间:2008-3-5 2:28:00 更新字数:3348">hello world</a>';
$newcontent=preg_match_all("|<[^>]+>(.*)</[^>]+>|",'<a href="495662.html"title="更新时间:2008-3-5 2:28:00 更新字数:3348">hello world</a>',$out);
echo $out[1][0];
?>
header("Content-Type:text/html;charset:UTF-8");
$content='<a href="495662.html"title="更新时间:2008-3-5 2:28:00 更新字数:3348">hello world</a>';
$newcontent=preg_match_all("|<[^>]+>(.*)</[^>]+>|",'<a href="495662.html"title="更新时间:2008-3-5 2:28:00 更新字数:3348">hello world</a>',$out);
echo $out[1][0];
?>
header("Content-Type:text/html;charset=utf-8");$content = '<a href="495662.html"title="更新时间:2008-3-5 2:28:00
更新字数:3348">第一章 我没有姓 </a> <a href="495663.html"title="更新时间:2008-3-5 2:28:00
更新字数:3483">第二章 有贼胆没贼心 </a> <a href="495664.html"title="更新时间:2008-3-5 2:28:00
更新字数:3052">第三章 一顾倾人城 </a> <a href="495665.html"title="更新时间:2008-3-5 2:28:00
更新字数:2721">第四章 蛰伏的血性 </a> <a href="495666.html"title="更新时间:2008-3-5 2:28:00
更新字数:3118">第五章 扮猪吃老虎 </a>';preg_match_all("/<a.*?href=\"(.*?)\.html\".*?>(.*?)<\/a>/is",$content,$pArr);$a1 = $pArr[1];
$a2 = $pArr[2];for($i=0;$i<count($a1);$i++)
{
echo $a1[$i].'<br>';
}echo '-----------------------------------------<br>';for($i=0;$i<count($a2);$i++)
{
echo $a2[$i].'<br>';
}
?>
这个正在表达式配置的字符串举个例子,让小弟学习一下