正则匹配问题 $str = '<td itemprop="ProductID"><h1>AN41908A-VB</h1></td>';preg_match("/<td itemprop=\"ProductID\"><h1>(.*?)<\/h1><\/td>/is", $str,$name);print_r($name);为什么打印数组是空的Array ( ) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 因为> <在str中间有换行符,你没匹配 为什么不空呢?<h1>前和</h1>后不是都有换行符吗?preg_match("/<td itemprop=\"ProductID\">.*<h1>(.*?)<\/h1>.*<\/td>/is", $str,$name); preg_match("/<td itemprop=\"ProductID\">\s+<h1>(.*?)<\/h1>\s+<\/td>/is", $str,$name); preg_match("/<td itemprop=\"ProductID\">\n+<h1>(.*?)<\/h1>\n+<\/td>/is", $str,$name); preg_match('/<td itemprop="ProductID[\w\W]*?h1>(.*?)</i', $str,$name); 请问这段语句有什么错误 如何遍历js 又是关于php数据库乱码的问题~~~很奇怪哦! php怎样得到一组同名radio单选按钮的值 可以帮我解决吗? 好久没有来了,散点分。顺便讨论一下BLOG方面的技术好吗? 愁死人了,谁帮帮我 用户名的检测问题~~ 请问高手PHP的session是怎么来创建的,怎么好象比asp还麻烦的???? 面向对象分析与设计疑问 PHP读取其他机器上的文件? 64位的win2008上怎么配置ZendOptimizer-3.3.3
<h1>前和</h1>后不是都有换行符吗?preg_match("/<td itemprop=\"ProductID\">.*<h1>(.*?)<\/h1>.*<\/td>/is", $str,$name);