$s = join("",file("文件名"));
preg_match_all("/----- The following addresses had permanent fatal errors -----
<.+>
    \(reason: .+\)/",$s,$regs);
print_r($regs);

解决方案 »

  1.   

    结果是这样;
    Array ( [0] => Array ( [0] => ----- The following addresses had permanent fatal errors ----- (reason: 553 5.3.5 system config error) [1] => ----- The following addresses had permanent fatal errors ----- (reason: 553 5.3.5 system config error) ) ) 只是把其中的这一段信息取到了。但并没有拿到中间的email信息。还请继续帮忙!
      

  2.   

    结果是
    Array
    (
        [0] => Array
            (
                [0] => ----- The following addresses had permanent fatal errors -----
    <[email protected]>
        (reason: 553 5.3.5 system config error)
            ))
    请用查看“源文件”,直接浏览器是看不到<[email protected]>的,因为浏览器把他当作标记了
      

  3.   

    果然如此。多谢唠叨兄。
    不过还有一问。我如果再进一步。拿中间的email地址呢?
      

  4.   

    其中
    <.+>
    改成
    <(.+)>
    结果在$regs[1]中