php 正则
有关PHP正则,提取网页指定内容的问题。求教!!
$content = '<META name="httpfileurl" content=" http://stor.vdisk.cn/loadfile/C8/CE8%B5%84%E6%BA%90%E7%9B%92%E4%BD%BF%E7%94%A8%E6on%95%99%E7%A8%8B.mp4">'; $content = preg_match("|content=\"(.*)\"|",$content,$match); echo($match[1]);
$content = '<META name="httpfileurl" content=" http://stor.vdisk.cn/loadfile/C8/CE8%B5%84%E6%BA%90%E7%9B%92%E4%BD%BF%E7%94%A8%E6on%95%99%E7%A8%8B.mp4">'; $content = preg_match("|content=\"(.*)\"|",$content,$match); echo($match[1]);
$content = '<META name="httpfileurl" content=" http://stor.vdisk.cn/loadfile/C8/CE8%B5%84%E6%BA%90%E7%9B%92%E4%BD%BF%E7%94%A8%E6on%95%99%E7%A8%8B.mp4">'; $content = preg_match("|content=\"(.*)\"|",$content,$match); echo($match[1]);
$content = '<META name="httpfileurl" content=" http://stor.vdisk.cn/loadfile/C8/CE8%B5%84%E6%BA%90%E7%9B%92%E4%BD%BF%E7%94%A8%E6on%95%99%E7%A8%8B.mp4">'; $content = preg_match("|content=\"(.*)\"|",$content,$match); echo($match[1]);
$content = preg_match("|\"httpfileurl\"(\s+)?content=\"(.*)\"|",$content,$match);echo $match[2];