正则表达式返回列表if(isset($url)){
echo "$url 有下列裢接:
";
$fcontents = file($url);
while(list(,$line)=each($fcontents)){
while(eregi('(href[[:space:]]*=[[:space:]]*"?[[:alnum:]:@/._-]+"?)(.*)',$line,$regs)){
$regs[1] = eregi_replace('(href[[:space:]]*=[[:space:]]*"?)([[:alnum:]:@/._-]+)("?)',"\\2",$regs[1]);
echo " $regs[1]
";
$line = $regs[2];
}
}
}
?>
阅读(343) | 评论(0) | 转发(0) |