[求助]对文本中数据的分类问题
非常感谢你在百忙之中抽空为我解答,以下是问题:对文本中的数据冒号后面部分的数据进行分类:
1.从A0001冒号后面的6个数中每次抽取4个(取15次,即C(6,4)),将每次抽取出来的4个数对全部数据逐个查找,看是否有完全相同的,如有则将该行数据写入一个新建的文本中。
2.举例:比如在文本的第一行抽取的是02,06,24,29,在对全部数据逐个查找得到的结果输出到新建文本(新建文件名以抽取的4个数命名02,06,24,29.txt)中如下:
A0001:02,06,07,24,28,29
A0005:01,02,06,11,24,29
A0017:01,02,06,10,24,29
以下是文本的部分数据:
A0001:02,06,07,24,28,29
A0002:02,08,21,24,29,31
A0003:05,07,09,16,18,27
A0004:13,17,19,24,26,30
A0005:01,02,06,11,24,29
A0006:12,14,18,20,26,28
A0007:04,10,12,18,23,25
A0008:02,12,13,14,31,33
A0009:01,05,08,15,16,30
A0010:06,11,21,25,28,31
A0011:08,09,13,27,29,31
A0012:08,10,15,17,22,30
A0013:11,16,23,26,27,33
A0014:05,07,09,16,20,26
A0015:03,05,13,19,20,25
A0016:06,08,14,17,18,30
A0017:01,02,06,10,24,29
A0018:02,21,22,23,27,28
A0019:10,15,17,25,31,32
A0020:04,08,17,24,28,33
A0021:01,03,06,07,09,11
A0022:12,16,17,24,28,29
A0023:02,08,14,23,25,32
A0024:09,15,18,29,32,33
A0025:03,08,09,13,15,18
A0026:06,14,16,26,28,29
A0027:04,15,21,25,29,33
A0028:06,09,12,16,27,31
A0029:03,06,14,18,20,26
A0030:05,10,16,23,27,33