我正在尝试提取<meta property="al:ios:url" content="snssdk1180://live?room_id=
和之间的字符串" data-rh="true">
。
输入示例:
<meta property="al:ios:url" content="snssdk1180://live?room_id=7362593220718381829" data-rh="true">
预期输出:
7362593220718381829
答案1
像这样:
@echo off
set TextFile=test.txt
for /f tokens^=^5^ delims^=^=^" %%a in ('type "%TextFile%" ^|find /i "live?room_id"') do set "Output=%%a"
echo %Output%
echo.
pause
exit