本帖最后由 ivor 于 2020-11-15 19:45 编辑
- #&cls&@powershell "Invoke-Expression ([Io.File]::ReadAllText('%~0',[Text.Encoding]::UTF8))" &pause&exit
-
- (dir *.txt | %{
- $txt = [Io.File]::ReadAllText("$_",[Text.Encoding]::UTF8)
- $date = [Regex]::Match($txt, "日期:\d+")
- $question = [Regex]::Match($txt, "问题:\d+")
- $method = [Regex]::Match($txt, "方法:\d+")
- ($date.Value,$question.Value,$method.Value) -join "`t"
- } )| tee new.csv
复制代码
|