style=""正则匹配 <div id=\csuid3_wpcpcd\ class=\wpcpdCSS\ style="">里面那个style=""怎么用正则匹配啊 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 preg_match('/style="([^"]*+)"/is', $str, $matches); $chenrui=file_get_contents("http://wenda.tianya.cn/wenda/thread?tid=37dc202581df20e4&clk=cts_ht");preg_match('/id=\csuid3_wpcpcd\ class=\wpcpdCSS\ style="([^"]*+)"/is', $chenrui, $matches);print_r($matches);获取不到内容啊,空的 $chenrui=file_get_contents("http://wenda.tianya.cn/wenda/thread?tid=37dc202581df20e4&clk=cts_ht"); preg_match_all('#(style=)\"[^"]*\"#', $chenrui, $matches,PREG_PATTERN_ORDER); print_r($matches); 试试 <div id=csuid3_wpcpcd class=wpcpdCSS style=""> 注意看,style里面的内容为空 能不能说詳細一下情况, 只要获得style=""里的内容? 不管什么输出什么 ? 怎么推广网站? php里子类如何调用父类方法? php源码阅读 谁会用PHP写分享到人人网等网站 ipad/safari浏览器问题 数组问题 求大侠给个方法 一个内容分词与密度的问题,在线等 github上SSH有什么用。用https替代。 discuz 想在门户首页自定SQL读取数据库信息,该怎么操作? 网页上传服务器 有谁知道南京明羽科技有限公司的? 页面统计系统修改限制天数和外部ip数据库
preg_match('/id=\csuid3_wpcpcd\ class=\wpcpdCSS\ style="([^"]*+)"/is', $chenrui, $matches);
print_r($matches);
获取不到内容啊,空的
preg_match_all('#(style=)\"[^"]*\"#', $chenrui, $matches,PREG_PATTERN_ORDER);
print_r($matches);
试试
注意看,style里面的内容为空