刚学php,想写个采集器,在采集繁体汉字就出现问题代码如下:
$b1 = '/class="style31">(^[\u4E00-\u9FFF]+$)<\/td>/is';
preg_match_all($b1, $url, $mls);
$count = count($mls[1]);
for($i=0;$i<$count;$i++) {     
 // 输出标题
echo $mls[1][$i]. "
" ;$url 为网页地址 页面反回
Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \U, or \u at offset 20 in F:\www\bet\updata.php on line 9
提示preg_match_all($b1, $url, $mls);出错,到底要怎样才能解决?

解决方案 »

  1.   


    $b1 = '/class="style31">(^[\\u4E00-\\u9FFF]+$) <\/td>/is'; 
    preg_match_all($b1, $url, $mls); 
    $count = count($mls[1]); 
    for($i=0;$i <$count;$i++) {    
    // 输出标题 
    echo $mls[1][$i]. " 
    " ; 
      

  2.   

    还是出现Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \U, or \u at offset 20,到底要怎么解决呢?