如何用批处理获取文本中两段指定字符串中间的内容

在一个文本中,有一段内容是这样的:
{"counts":[100,200,3000],"match"

现在需要提取{"counts":和,"match"中间的内容,也就是提取[100,200,3000],用批处理怎么写?谢谢

@echo off
for /f "tokens=2 delims=[]" %%i in ('findstr /i counts a.txt^|findstr match') do echo %%i

温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答