我有這個文件/字符串:的preg_match正則表達式,一個新的生產線,但沒有兩條新線,空格等
----- Transcript of session follows -----
... while talking to mta6.am0.yahoodns.net.:
>>> DATA
<<< 554 delivery error: dd Sorry your message to [email protected] cannot be delivered. This account has been disabled or discontinued [#102]. - mta1070.mail.ac4.yahoo.com
554 5.0.0 Service unavailable
--p94IAEl4012027.1317751814/foo.com
----- Transcript of session follows -----
... while talking to mail.messaging.microsoft.com.:
>>> DATA
<<< 550 5.7.1 Service unavailable; Client host [foo] blocked using Blocklist 2, mail from IP banned; To request removal from this list please forward this message to [email protected]
550 5.1.1 <[email protected]>... User unknown
<<< 503 5.5.2 Need rcpt command
--p94I91SC011973.1317751741/foo.com
Content-Type: message/delivery-status
我需要後獲得部分「的答問如下---」 ,直到空白的新行(或者我認爲是double new_line)。
我想是這樣的
<?php preg_match("/----- Transcript of session follows -----\n(.*)\n\n/",$email, $transcript_matches);?>
,但不正確,而不是.*
我可能需要any char OR new line but NOT two new lines
。之後它two new lines
。我怎麼寫這個?
謝謝。
你需要使用一個16進制軟件,看看有什麼輸入你實際有。 – mario