66899981 当前离线
列兵
@echo off for %%1 in (data.txt)do (findstr /v "|4| |20| |26| |70| |07|" "%%1"># move "#" "%%1">nul 2>nul )复制代码
aloha20200628 当前在线
少校
echo off &findstr /lv "|4|" data.txt>0.0 move /y 0.0 data.txt pause&exit/b 复制代码
echo off &find /v "|4|" data.txt|more +2>0.0 move /y 0.0 data.txt pause&exit/b 复制代码
TOP
回复 66899981 aloha20200628 发表于 2024-10-27 09:29
echo off &findstr /lv "|4| |05| |10000|" data.txt>0.0 move /y 0.0 data.txt pause&exit/b复制代码
echo off & for %%k in (4 20 26 70 07) do ( find /v "|%%k|" data.txt|more +2>0.0 move /y 0.0 data.txt ) pause&exit/b复制代码
77七 当前离线
中校
findstr /v "|[0-9][0-9]*|" data.txt > out.txt复制代码
回复 66899981 或用以下方法,把 一长串匹配数 填入 for...() 里,遍历提取逐一删除... aloha20200628 发表于 2024-10-27 11:27
楼主是不是想删除 包含 |数字| 的行? 77七 发表于 2024-10-27 11:31
findstr /vg:"keywords.txt" "data.txt" > "out.txt"复制代码
回复 66899981 又是一个猜谜...似乎是用findstr匹配多个 ‘|n|’ 组成的整个字符串长度超限了,如是就 ... aloha20200628 发表于 2024-10-27 11:47
|000004| |000020| |000026|复制代码
回复 66899981 keywords.txt 什么超限制了? 77七 发表于 2024-10-27 12:19