preg_match_all("#<li>(.+):(.+)</li>#isU", $html, $r);
print_r($r);

解决方案 »

  1.   

    I'm weak in Mastering Regular Expressions ...
      

  2.   

    u'd better use php simple xml function to retrieve the data, regex is not reliable while processing complex strings.
      

  3.   

    There is no unreliable regex but unreliable person.
      

  4.   

    如果数据格式是这样的话..为什么要用正则呢,直接用XMLDoc多好?
      

  5.   

    xuzuning(唠叨): 谢谢你!你解决了我提出的几个问题了zeroleonhart  celas  Meteorlet  :
    你们是中国用户吗?还好我看得懂英文,呵呵。
    其实我想做的东西就是解析别人的网页,网页中提供的就是这样的数据格式,而且是不规则的。我没办法使用XMLDOC去读取它了。不过还是谢谢你们的热心哦不过还是希望你们下次能使用本国语言哦,谢谢!