lj670 当前离线
上等兵
评分人数
Five66 当前离线
上尉
@echo off&chcp 936 ( for /f "eol=? delims=" %%a in (00.txt) do ( set "line=%%a" setlocal enabledelayedexpansion set line=《!line:*《=! for /f "tokens=1 delims=》" %%b in ("!line!") do ( endlocal set "line=%%b》" ) if "!nil!" == "%nil%" endlocal setlocal enabledelayedexpansion echo:!line! endlocal ))>>OO.txt echo done!!! pause&exit/b复制代码
TOP
银八 当前离线
列兵
@echo off&chcp 65001 for /f "tokens=1,2,3 delims=《》" %%a in (00.txt) do echo 《%%b》>>新文件.txt复制代码
aloha20200628 当前在线
sed -r "s/[^《》]*《([^《》]+)》[^《》]*/《\1》/g" 00.txt复制代码
77七 当前在线
中校
@echo off rem 批处理和文本全部保存为ansi编码 cd /d "%~dp0" (for /f "useback delims=" %%a in ("00.txt") do ( for /f "tokens=2 delims=《》" %%b in ("#%%a#") do ( echo 《%%b》 ) )) > $ move $ "00.txt" pause复制代码
sed -r "s/[^《》]*《([^《》]+)》[^《》]*/《\1》/g" "00.txt"&echo,&pause复制代码
sed -r "s/[^《》]*《([^《》]+)》[^《》]*/《\1》/g" "00.txt">"_" & move /y "_" "00.txt"复制代码
qixiaobin0715 当前离线
大校
@echo off (for /f "tokens=1-2 delims=《》" %%a in (00.txt) do if "%%b"=="" (echo,《%%a》) else echo,《%%b》)>temp del 00.txt ren temp 00.txt pause复制代码
hfxiang 当前离线