gpt-3.5-turbo-0613· OpenAI
WildChat-4.8M (AI2)
Active code page: 65001 Debug Mode PaddleOCR-json v1.2.1 OCR init completed.…
- User
Active code page: 65001 Debug Mode PaddleOCR-json v1.2.1 OCR init completed. {"code":100,"data":[{"box":[[47,42],[72,42],[72,59],[47,59]],"score":0.9723867774009705,"text":"107"}]} OCR exit. 这是output.txt的文本内容,要求用bat文件提取"text"后面的数字串到number.txt
- Assistant
您可以使用以下批处理脚本将文件中的文本提取出来并保存到number.txt中:
@echo off setlocal enabledelayedexpansion set "input=output.txt" set "output=number.txt" for /f "usebackq tokens=2 delims=:" %%i in ("%input%") do ( set "line=%%i" set "line=!line:~1!" echo !line! >> "%output%" ) echo 提取完成! pause将以上代码保存为extract.bat文件,在与output.txt在同一个文件夹下运行该批处理脚本文件,即可将提取结果保存到number.txt中。
请确保在运行该批处理脚本之前,output.txt文件已经存在且内容正确。
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.