lantern 当前离线
上等兵
codegay 当前离线
少校
(\w{4})(?=\w{4})复制代码
\1-复制代码
TOP
pcl_test 当前离线
荣誉版主
sed -i "s/.\{4\}/&-/g;s/-$//g" "文本.txt"复制代码
(\w{4})(\w{4})复制代码
\1-\2复制代码
gawk 当前离线
少将
@echo off setlocal enabledelayedexpansion (for /f %%i in ('type "1.txt"') do ( set str=%%i echo !str:~0,4!-!str:~4,4!-!str:~8,4!-!str:~12,4! ))>2.txt复制代码