188388 当前离线
列兵
went 当前在线
少校
@echo off REM 文件路径 set "txt=123.txt" powershell -version 2.0 -c "(Get-Content '123.txt') -replace '(.)','【$1】' | Out-File 'new.txt'" pause&exit复制代码
TOP
xp3000 当前离线
少尉
评分人数
@echo off REM 文件路径 set "txt=123.txt" powershell -version 2.0 -c "(Get-Content '123.txt') -replace '(?=[^\n])','】【' -replace '^】','' -replace '(?<=\S)(?=\s*$)','】' | Out-File 'new.txt'" pause&exit复制代码
@echo off REM 文件路径 set "txt=123.txt" powershell -version 2.0 -c "(Get-Content '%txt%') | foreach {($_ -replace '(?=[^\s])(?<=[^\s])','】【' -replace '(?<=^\s*)','【' -replace '【(?=\s)','') + '】'} | Out-File 'new.txt'" pause&exit复制代码