回复 4# zhengwei007
用4楼的例子,试一下系统自带的powershell
另存为bat文件运行- #@&cls&powershell "type '%~0'|out-string|iex"&pause&exit
- gc test.json|%{
- [regex]::Matches($_,'\{(?<k>{\[[^\]]+\][^\}]+\};?)+\};(?<v>[^\}]+)')|%{
- $v=$_.groups['v'].value
- $_.groups['k'].captures.value|%{$_ -replace '^\{\[([^\]]+)\];([^;]+);([^;]+);([^;]+)\};?',"`$1`t`$2`t`$3`t`$4`t$v"}
- }
- }
复制代码
|