这段代码也许是因为数组容量的限制,只能写成这样了。#include <array.au3>
#include <string.au3>
If FileExists("2.txt") Then FileDelete("2.txt")
If FileExists("3.txt") Then FileDelete("3.txt")
Dim $i=1
While 1
$str=FileReadLine("1.txt",$i);1.txt文件内容为楼主提供字符串
If $str="" Then ExitLoop
If StringInStr($str,"ldstr bytearray") Then
FileWrite("2.txt",$str)
Else
If StringInStr($str,"//") Then FileWrite("2.txt",$str)
EndIf
$i+=1
WEnd
$str1=StringRegExpReplace(FileRead("2.txt"),'\/\/.{1,20}\s','')
$str1=StringStripWS ( $str1, 4)
FileWrite("3.txt",$str1)
$arr = _StringBetween($str1, '(', ')')
_ArrayDisplay($arr)
|