求个正则,冰天雪地裸身跪求,急用

danshenyangxuesheng 2011-01-23 03:29:05
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN"

"http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>测试 </title>
<meta http-equiv="Refresh" content="1;url=http://rich.mail.richcode.com/cgi-bin/loginpage?

f=xhtml&s=verifycode&aliastype=@qq.com&clientuin=779703486&mss=1&autologin=n&plain=&ppp=c2p7c3tmbT1wfWQE&spcache=&t

fcont=22%20serialization%3A%3Aarchive%205%200%200%208%200%200%200%208%20authtype%201%208%209%20clientuin

%209%20779703486%209%20aliastype%207%20%40qq.com%206%20domain%206%20qq.com%201%20f%205%20xhtml%203%20uin

%209%20779703486%203%20mss%201%201%207%20btlogin%204%20%E7%99%BB%E5%BD%95
" />
<link href="http://w.mail.richcode.com/cgi-

bin/getcss?fn=m.css" rel="stylesheet" type="text/css" />
<meta http-equiv="pragma" content="no-cache" />
<meta http- equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="thu, 01 jan 1970 00:00:00

gmt" />
</head>
<body>
<div class="titlebar tbold">
测试</div>
<div class="content2">
测试</div>
</body>
</html>


把红色部分匹配出来 ,跪求!!!
...全文
117 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
清风闲客 2011-01-25
  • 打赏
  • 举报
回复
preg_match('/<meta http-equiv="Refresh" content="1;url=([^"]+)"/i',$str,$matches);
print_r($matches);

tottyandbaty 2011-01-25
  • 打赏
  • 举报
回复


preg_match_all(“/url=\"([\s\S]+?)\"/i”, $str, $arr);
print_r($arr);
浴火_凤凰 2011-01-25
  • 打赏
  • 举报
回复
需求不是很详细,只能这样:
preg_match('/<meta http-equiv="Refresh" content="1;url=([^"]+)"/i',$str,$matches);
print_r($matches);
xglove2006 2011-01-24
  • 打赏
  • 举报
回复
$pattern = '/\<meta http\-equiv=\"refresh\" content=\"1;url\=(.+?)\" \/\>/is';

preg_match($pattern, $html, $matches);
print_r($matches);

测试过可用。
skyaspnet 2011-01-24
  • 打赏
  • 举报
回复


preg_match('/<meta http-equiv="Refresh" content="1;url=[\s\S]*"/i, $str, $arr);

var_dump($arr);


tangjianft 2011-01-23
  • 打赏
  • 举报
回复

preg_match('/<meta http-equiv="Refresh" content="1;url=(.*?)"/i',$str,$matches);
print_r($matches);
床上等您 2011-01-23
  • 打赏
  • 举报
回复

preg_match('/<meta http-equiv="Refresh" content="1;url=([^"]+)"/i',$str,$matches);
print_r($matches);

21,882

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧