原帖由 clonecd 于 2008-7-10 17:14 发表 
$File = FileOpen("b.txt", 0)
$Source = FileRead($File)
FileClose($File)
$res = StringRegExpReplace($Source, "\x3c[^\x3e]*\x3e", "")
MsgBox(0, "", $res)
呵呵,不错,
我也来个,反其道而行,
#include "array.au3"
$File = FileOpen("b.txt", 0)
$Source = FileRead($File)
FileClose($File)
$array = StringRegExp($Source, '[^\x00-\xff]+', 3);
;~ _ArrayDisplay($array)
If IsArray($array) Then
$newtxt = _ArrayToString($array, @CRLF)
MsgBox(0, "提取到的中文字符", $newtxt)
EndIf
|