0
我有一個txt文件,其中提供了大量的信息。 我想讀取和存儲'狀態'部分。閱讀每行的txt文件的特定部分
例子:
id........username...... status......language .......image
11111 abcdefg Man Utd won for the second time ENG img1244
11112 abcdaaa Man Utd won for the third time ENG img1245
11113 abcdbbb Man Utd won for the fourth time ENG img1246
11114 abcdccc Man Utd won for the fifth time ENG img1247
11115 abcdddd Man Utd won for the sixth time ENG img1248
And what I should obtain is the following
Man Utd won for the second time
Man Utd won for the third time
Man Utd won for the fourth time
Man Utd won for the fifth time
Man Utd won for the sixth time
我想要做的就是從用戶名字符串數據存儲到「ENG」串什麼。
感謝您的幫助。
謝謝您的回答和幫助,但如果我沒有固定的beginging句子,如「Man」或「Woman」,該怎麼辦?它與everyline不同,我所知道的是用戶名以數字(0-9)結尾。 它是這樣的: 11111 abcdef9曼聯第二次獲勝ENG img1244 –
我想出的腳本並不關心任何人或女人部分之前的任何內容,並且將適用於您擁有的所有文本語法示例給出。運行它反對你的實際文件,讓我知道它是如何工作的。 – Drew
好的,我解決了我的問題。非常感謝。 –