题目如下:
aaa (10 usages found)
bbb (10 usages found)
ccc (10 usages found)
ddd (10 usages found)
eee (10 usages found)
fff (8 usages found)
ggg
qqqqwqwqw.txt (2 usages found)
9 "some text"
wwewewwew.txt (2 usages found)
4 "some text"
ererereer.txt (2 usages found)
59 "some text"
rtrtrtrtr.kt (2 usages found)
3 "some text"
hhh (5 usages found)
jjj (2 usages found)
tytyyttyty.txt (1 usage found)
211 * "some text"
kkk (3 usages found)
bfgbgfgbfg.txt (1 usage found)
475 "some text"
nghmgmhgmhhg.txt (2 usages found)
619 "some text"
628 "some text"
以上带层级的文本中,每一行表示文件夹名称、文件名或行数。其中".txt"后缀结尾表示某个文件名,以数字开头的表示对应文件的指定行数。
现在你需要使用javascript实现将所有的.txt文件全路径以及行数输出,输出示例如下:
aaa/bbb/ccc/hhh/kkk/nghmgmhgmhhg.txt: 619,628
注:请忽略"(x usages found)"子串,因为是个干扰项,其中x指代任意数字。
题目来源我今天碰到的一个实际应用场景,一开始尝试用GPT4-o然后以失败告终 ,而且是怎么教都教不对。
看看大家的AI咋样
大伙记得别直接复制AI的回答来回复,不然会被自动举报的