首页 > 解决方案 > 在批处理文件中选择性查找?

问题描述

我想从文件中删除特定的文本片段,虽然我似乎只能得到整行文本83: href="https://website.com/thing.rar"><img,但是当我使用find /V "83:" | find /V "href="它时,它会删除整行。

我怎么只能有选择地从一堆中选择链接?这是我到目前为止一直在使用的:

findstr /i /n "https://website.*rar" C:\Users\New\output.txt >> C:\Users\New\output2.txt

然后

findstr /i /n /v "83: href= ><img" C:\Users\New\output2.txt >> C:\Users\New\output3.txt

标签: batch-filecmdfindfindstr

解决方案


推荐阅读