举报
$i = 1 Do $fileline = FileReadLine('1.txt', $i) If @error = -1 Then Exit $T = stringregexp($fileline, '^[ *\d*].+', 2, 1) If @error = 0 Then MsgBox(0,'',$T[0]) $i += 1 Until 0
$file2 = FileOpen("test.txt", 0) If $file2 = -1 Then MsgBox(0, "错误", "不能打开文件.") Exit EndIf $i=1 While 1 $line2 = FileRead($file2) If @error = -1 Then ExitLoop $T = stringregexp($line2, '\d+(.*\s*)+ABC', 2) If @error Then MsgBox(0,'',"X") Else MsgBox(0,'',$T[0]) EndIf Wend
;more exactly stringregexp($line2, '\r\s*(\d+)(.*\s*)+?ABC\s*\r', 2)
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-2-24 07:09 , Processed in 0.073379 second(s), 19 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2024 Discuz! Team.