我有一个标准的txt文件。我要在某一点之后删除所有内容。 我已经使用以下正则表达式捕获了所有想要保留的内容:
(.+\t\d+\t.+\t\d\t.+\t\d.+)
在txt文件中,一行包含Row Count \t
(后跟行数)
示例:AB\t1234567890\tStudent Individual Monthly PAID\t1\t.012345\t.012345\tABCD12345678\tFuck Russt\tT-Wayne\t1\t1\tABCD12345678\t0\t123\tEntertainment\tA12342A1234567890A
Row Count\t123456
Abcdefghij Abcd\tAbcdefghij Abcd\tAbcdefgh\tAbc Abcdefg Abcde
AB\tFamily Monthly Gratis Trial\t1234\t0.00
AB\tIndividual Monthly Gratis Trial\t12345\t0.00
AB\tStudent Monthly Gratis Trial\t1234\t0.00
AB\tFamily Introductory OFFER\t123456\t123.45
AB\tIndividual Introductory OFFER\t123456\t1234.56
AB\tStudent Individual Introductory OFFER\t12345\t123.45
AB\tFamily Monthly PAID\t1234567\t12345.67
AB\tIndividual Annual PAID\t12345\t123.45
AB\tIndividual Monthly PAID\t1234567\t12345.67
AB\tStudent Individual Monthly PAID\t123456\t1234.56
期望的结果:AB\t1234567890\tStudent Individual Monthly PAID\t1\t.012345\t.012345\tABCD12345678\tFuck Russt\tT-Wayne\t1\t1\tABCD12345678\t0\t300\tEntertainment\tA12342A1234567890A
我想删除“行数”行以及随后的所有内容。
对此将提供任何帮助