如何在现有的 .txt 文件中找到所有字符串“ID”并获取找到了多少个字符串?
我有一个 .txt 文件,例如:
Product ID = "001", Product Name = "P1"
Product ID = "002", Product Name = "P2"
Product ID = "003", Product Name = "P3"
...
我想Product ID = "LASTEST_ID_PLUS_1, Product Name = "new"
在文件末尾添加,但不知道如何获取最后一个 ID 号。