我目前在一個名爲google.txt
的文件中存儲了以下行。我想分離這些行並將這些分離的字符串存儲在數組中。將字符串存儲在一個數組中
像第一行
@qf_file= q33AgCEv006441
@date = Tue Apr 3 16:12
@junk_message = User unknown
@rf_number = [email protected]
the line ends at the @rf_number at last emailadress
q33AgCEv006441 1038 Tue Apr 3 16:12 <[email protected]>
(User unknown)
<[email protected]>
q33BDrP9007220 50153 Tue Apr 3 16:43 <[email protected]>
(Deferred: 451 4.2.1 mailbox temporarily disabled: paond.tndt)
<[email protected]>
q33BDrPB007220 50153 Tue Apr 3 16:43 <[email protected]>
(User unknown)
[email protected]>
<[email protected]>
<[email protected]>
q33BDrPA007220 50153 Tue Apr 3 16:43 <[email protected]>
(User unknown)
<[email protected]>
<[email protected]>
q2VDWKkY010407 2221878 Sat Mar 31 19:37 <[email protected]>
(host map: lookup (now-india.net.in): deferred)
<[email protected]>
q2VDWKkR010407 2221878 Sat Mar 31 19:31 <[email protected]>
(host map: lookup (aaplawoffices.in): deferred)
<[email protected]>
q2U8qZM7026999 360205 Fri Mar 30 14:38 <[email protected]>
(host map: lookup (now-india.net.in): deferred)
<[email protected]>
<[email protected]>
q2TEWWE4013920 2175270 Thu Mar 29 20:30 <[email protected]>
(host map: lookup (now-india.net.in): deferred)
<[email protected]>
<[email protected]>
你有寫的任何代碼嗎?它是堆棧溢出禮儀來啓動一些代碼和/或顯示你已經嘗試過的東西。 – kevlar1818
另外,你能澄清實際的行結局在哪裏嗎?你說的是「第一行」,但引用代碼塊中的前3個明顯行... – kevlar1818
謝謝凱夫拉我編輯帖子,請參閱 –