回复 6# papapa314
;$contents = StringRegExp(FileRead(@ScriptDir & "\3.txt"), '(?s)(.+?)"\r', 3)
$contents=StringSplit(FileRead(@ScriptDir & "\3.txt"),'"'&@CRLF,3)
$num = UBound($contents)
$dir = @ScriptDir & "\" & @HOUR & "时" & @MIN & "分提取"
DirCreate($dir)
For $i = 0 To $num - 1
TrayTip("提示", "共有" & $num & "个文档等待提取,目前正在提取第" & $i & "个", 5)
$title = StringRegExp($contents[$i], "(?m)^.*?(?=\|)", 3)
FileWrite($dir & "\" & $title[0] & ".txt", StringReplace($contents[$i],"<BR>",@CRLF))
;_ReplaceStringInFile(@ScriptDir & "\" & $dir & "\" & $title[0] & ".txt", "<BR>", @CRLF)
Next
TrayTip("提示", "提取完毕,文档保存程序目录下" & $dir & "文件夹中", 50)
|