我收到了一些另存为.txt
文件的问题。我想从其选项中删除所有问题编号和换行符,并在该问题上放一个TAB空格。
像QUESTION<tab_space>OPTION1<tab_space>OPTION2<tab_space>OPTION3<tab_space>OPTION4
,然后是换行符和下一个问题。
我的文本文件如下:
11. Lungs are located in the
A) abdominal cavity
B) pericardial cavity
C) peritoneal cavity
D) pleural cavity
12. Which one of the following is the ideal food for newborn babies?
A) Water
C) Honey
B) Sugar
D) Milk
13. Transcription means the synthesis of
A) Lipids
C) DNA
B) Protein
D) RNA
我想如何做到这一点:
Lungs are located in the abdominal cavity pericardial cavity peritoneal cavity pleural cavity
Which one of the following is the ideal food for newborn babies? Water Honey Sugar Milk
Transcription means the synthesis of Lipids DNA Protein RNA
这样做是因为,然后我可以将所有内容复制并粘贴到EXCEL文档中,其中TAB识别为下一行,LINE_BREAK识别为下一行。为我轻松复制。我只是想知道如何用记事本替换单词,不知道如何删除换行符或这些数字以点(。)
结尾我的目标:
删除所有换行符
用换行符[11.]结束时用点(。)替换所有数字。
用TAB空间替换[)到')'