大概是
ereg("(\[url\])(.+)(\[url\])",$source,$results);
$results[1],$results[2],$results[3]
POSIX的正则表达式规则不太好找eregi是大小写不敏感

解决方案 »

  1.   

    http://www.jollr.com/forum/showthread.php?s=&threadid=1779
    到这里来看看。
      

  2.   

    (.+)是什么意思呢?
    我试过这样:
      $pat1="\[url\]";
      $pat2="([0-9a-zA-z])";
      $pat3="\[\/url\]";
      $pattern="$pat1$pat2$pat3";
      $target="abcd";
      ereg($pattern,$targer,$matches);
      echo $matches[0];
      echo $matches[1];
      echo $matches[2];
      
    结果显示: urlr
    经过查看:是$matches[0]='url' 
               $matches[1]='r'
               $matches[2]=''; 
    怎么会这样呢?