batch-file - 在批处理文件中选择性查找?
问题描述
我想从文件中删除特定的文本片段,虽然我似乎只能得到整行文本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
解决方案
推荐阅读
- python - 在 Python 中使用 Regex 并替换整个文件。然后保存更改?
- vulkan - 更新 VertexBuffer / IndexBuffer 时,在 vkCmdCopyBuffer 之后是否需要 vkCmdPipelineBarrier?
- apache-kafka - Avro SerializationException 使 Kafka Streams 失败并关闭
- julia - 有效地重塑阵列 2D -> 3D
- javascript - jquery文件上传json响应没有得到
- mysql - 如何缩短使用之间的 sql 案例查询
- php - Laravel 路由模型绑定 - Laravel 5.7
- php - 使用表单编辑和保存 xml
- javascript - JavaScript 创建阶段何时结束,执行阶段何时开始?
- dataframe - 如何在 Spark Dataframe 中执行 Tukey HSD 测试?