Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <File.au3>
- ; TXT
- $Path=@ScriptDir&'\html'
- $FileList = _FileListToArray($Path, '*', 1)
- If @error Then
- MsgBox(0, "", "ошибка поиска")
- Exit
- EndIf
- $RuTXT = ''
- For $i = 1 To $FileList[0]
- $tmp = FileRead($Path & '\' & $FileList[$i])
- $aTmp = StringRegExp($tmp, '[^A-Za-z0-9=&()+,''";\-\[\]:<>*.#@|/\r\n\t _~?{}%$^©\\][А-Яа-яЁё ?.,]+', 3)
- If Not @error Then
- $RuTxtFile = ''
- For $j = 0 To UBound($aTmp) - 1
- $RuTxtFile &= $aTmp[$j] & '.'
- Next
- ; $RuTXT&=$FileList[$i]&@CRLF&@CRLF&$RuTxtFile &@CRLF&@CRLF
- $RuTXT &= $RuTxtFile & @CRLF & @CRLF
- Else
- ; $RuTXT&=' ----- '&$FileList[$i]&' - не найдено'&@CRLF&@CRLF
- EndIf
- Next
- ; пунктуационное приведение
- $RuTXT = StringReplace($RuTXT, ' .', '.')
- $RuTXT = StringRegExpReplace($RuTXT, '\.[ ]+', '. ')
- $RuTXT = StringRegExpReplace($RuTXT, '\.+', '.')
- $RuTXT = StringRegExpReplace($RuTXT, '\.(?![ t])', '. ')
- ; исключения, сделать удаление
- $RuTXT = StringReplace($RuTXT, '1111', '')
- $file = FileOpen(@ScriptDir & '\RuTXT.txt', 2)
- FileWrite($file, $RuTXT)
- FileClose($file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement